Change-Id: I6bd742a76b220578698838a1b81feed7eba967d5
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4737
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Xiaolin Li <xiaolinl@vmware.com>
(cherry picked from commit 23c989bc8120ba378e4913ead98aa964fa26cc43)
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4799
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,70 @@ |
0 |
+Summary: Microsoft .NET Core Runtime |
|
1 |
+Name: dotnet-runtime |
|
2 |
+Version: 2.0.5 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+Vendor: VMware, Inc. |
|
5 |
+Distribution: Photon |
|
6 |
+License: MIT |
|
7 |
+Url: https://github.com/dotnet/core |
|
8 |
+Group: Development/Tools |
|
9 |
+Source0: https://download.microsoft.com/download/1/1/0/11046135-4207-40D3-A795-13ECEA741B32/dotnet-runtime-2.0.5-linux-x64.tar.gz |
|
10 |
+%define sha1 dotnet-runtime=631b1f4a4c07a4488e846fc2142ce74c1b8b84a8 |
|
11 |
+BuildArch: x86_64 |
|
12 |
+Requires: curl libunwind krb5 lttng-ust |
|
13 |
+ |
|
14 |
+%description |
|
15 |
+.NET Core is a development platform that you can use to build command-line |
|
16 |
+applications, microservices and modern websites. |
|
17 |
+ |
|
18 |
+%prep |
|
19 |
+%setup -c dotnet-runtime-%{version} |
|
20 |
+ |
|
21 |
+%build |
|
22 |
+ |
|
23 |
+%install |
|
24 |
+mkdir -p %{buildroot}%{_libdir}/dotnet |
|
25 |
+mkdir -p %{buildroot}%{_docdir}/dotnet-runtime-%{version} |
|
26 |
+cp LICENSE.txt ThirdPartyNotices.txt %{buildroot}%{_docdir}/dotnet-runtime-%{version} |
|
27 |
+rm LICENSE.txt ThirdPartyNotices.txt |
|
28 |
+cp -r * %{buildroot}%{_libdir}/dotnet |
|
29 |
+mkdir -p %{buildroot}%{_bindir} |
|
30 |
+ln -sf %{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/dotnet |
|
31 |
+ |
|
32 |
+# Pre-install |
|
33 |
+%pre |
|
34 |
+ |
|
35 |
+ # First argument is 1 => New Installation |
|
36 |
+ # First argument is 2 => Upgrade |
|
37 |
+ |
|
38 |
+# Post-install |
|
39 |
+%post |
|
40 |
+ |
|
41 |
+ # First argument is 1 => New Installation |
|
42 |
+ # First argument is 2 => Upgrade |
|
43 |
+ |
|
44 |
+ /sbin/ldconfig |
|
45 |
+ |
|
46 |
+# Pre-uninstall |
|
47 |
+%preun |
|
48 |
+ |
|
49 |
+ # First argument is 0 => Uninstall |
|
50 |
+ # First argument is 1 => Upgrade |
|
51 |
+ |
|
52 |
+# Post-uninstall |
|
53 |
+%postun |
|
54 |
+ |
|
55 |
+ /sbin/ldconfig |
|
56 |
+ |
|
57 |
+ # First argument is 0 => Uninstall |
|
58 |
+ # First argument is 1 => Upgrade |
|
59 |
+ |
|
60 |
+%files |
|
61 |
+ %defattr(-,root,root,0755) |
|
62 |
+ %exclude %{_libdir}/debug |
|
63 |
+ %{_docdir}/* |
|
64 |
+ %{_bindir}/dotnet |
|
65 |
+ %{_libdir}/* |
|
66 |
+ |
|
67 |
+%changelog |
|
68 |
+* Wed Jan 31 2018 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.0.5-1 |
|
69 |
+- Initial build for photon |
0 | 70 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,38 @@ |
0 |
+%define debug_package %{nil} |
|
1 |
+Summary: Microsoft .NET Core SDK |
|
2 |
+Name: dotnet-sdk |
|
3 |
+Version: 2.1.4 |
|
4 |
+Release: 1%{?dist} |
|
5 |
+Vendor: VMware, Inc. |
|
6 |
+Distribution: Photon |
|
7 |
+License: MIT |
|
8 |
+Url: https://github.com/dotnet/core |
|
9 |
+Group: Development/Tools |
|
10 |
+Source0: https://download.microsoft.com/download/1/1/5/115B762D-2B41-4AF3-9A63-92D9680B9409/dotnet-sdk-2.1.4-linux-x64.tar.gz |
|
11 |
+%define sha1 dotnet-sdk=0201b2f073dea70abfc00383f8093f8dafa802ea |
|
12 |
+BuildArch: x86_64 |
|
13 |
+Requires: dotnet-runtime icu |
|
14 |
+ |
|
15 |
+%description |
|
16 |
+.NET Core is a development platform that you can use to build command-line |
|
17 |
+applications, microservices and modern websites. |
|
18 |
+ |
|
19 |
+%prep |
|
20 |
+%setup -c dotnet-sdk-%{version} |
|
21 |
+ |
|
22 |
+%build |
|
23 |
+ |
|
24 |
+%install |
|
25 |
+mkdir -p %{buildroot}%{_libdir}/dotnet/sdk |
|
26 |
+mkdir -p %{buildroot}%{_docdir}/dotnet-sdk-%{version} |
|
27 |
+cp -r sdk/%{version} %{buildroot}%{_libdir}/dotnet/sdk |
|
28 |
+cp LICENSE.txt ThirdPartyNotices.txt %{buildroot}%{_docdir}/dotnet-sdk-%{version} |
|
29 |
+ |
|
30 |
+%files |
|
31 |
+ %defattr(-,root,root,0755) |
|
32 |
+ %{_libdir}/* |
|
33 |
+ %{_docdir}/* |
|
34 |
+ |
|
35 |
+%changelog |
|
36 |
+* Wed Jan 31 2018 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.1.4-1 |
|
37 |
+- Initial build for photon |
0 | 38 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,41 @@ |
0 |
+Summary: International Components for Unicode. |
|
1 |
+Name: icu |
|
2 |
+Version: 55.1 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+License: MIT and UCD and Public Domain |
|
5 |
+URL: http://www.icu-project.org |
|
6 |
+Group: System Environment/Libraries |
|
7 |
+Vendor: VMware, Inc. |
|
8 |
+Distribution: Photon |
|
9 |
+Source0: http://download.icu-project.org/files/%{name}4c/%{version}/%{name}4c-55_1-src.tgz |
|
10 |
+%define sha1 icu=3bb301c11be0e239c653e8aa2925c53f6f4dc88d |
|
11 |
+%description |
|
12 |
+The International Components for Unicode (ICU) package is a mature, widely used set of C/C++ libraries providing Unicode and Globalization support for software applications. |
|
13 |
+%package devel |
|
14 |
+Summary: Header and development files |
|
15 |
+Requires: %{name} = %{version} |
|
16 |
+%description devel |
|
17 |
+It contains the libraries and header files to create applications |
|
18 |
+%prep |
|
19 |
+%setup -q -n %{name}/source |
|
20 |
+%build |
|
21 |
+./configure --prefix=%{_prefix} |
|
22 |
+make %{?_smp_mflags} |
|
23 |
+%install |
|
24 |
+make DESTDIR=%{buildroot} install |
|
25 |
+%files |
|
26 |
+%defattr(-,root,root) |
|
27 |
+%{_bindir}/* |
|
28 |
+%{_sbindir}/* |
|
29 |
+%{_libdir}/*.so.* |
|
30 |
+%exclude %{_libdir}/debug/ |
|
31 |
+%exclude %{_libdir}/icu/ |
|
32 |
+%files devel |
|
33 |
+%defattr(-,root,root) |
|
34 |
+%{_includedir}/* |
|
35 |
+%{_datadir}/* |
|
36 |
+%{_libdir}/*.so |
|
37 |
+%{_libdir}/pkgconfig/*.pc |
|
38 |
+%changelog |
|
39 |
+* Wed Jan 31 2018 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 55.1-1 |
|
40 |
+- Initial build for photon |
0 | 41 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,44 @@ |
0 |
+#!/bin/bash |
|
1 |
+#See https://github.com/PowerShell/PowerShell/blob/master/docs/building/internals.md |
|
2 |
+ |
|
3 |
+set -e |
|
4 |
+ |
|
5 |
+pushd src/powershell-unix |
|
6 |
+dotnet restore |
|
7 |
+popd |
|
8 |
+ |
|
9 |
+pushd src/ResGen |
|
10 |
+dotnet restore |
|
11 |
+dotnet run |
|
12 |
+popd |
|
13 |
+ |
|
14 |
+pushd src |
|
15 |
+targetFile="Microsoft.PowerShell.SDK/obj/Microsoft.PowerShell.SDK.csproj.TypeCatalog.targets" |
|
16 |
+cat > $targetFile <<-"EOF" |
|
17 |
+<Project> |
|
18 |
+ <Target Name="_GetDependencies" |
|
19 |
+ DependsOnTargets="ResolveAssemblyReferencesDesignTime"> |
|
20 |
+ <ItemGroup> |
|
21 |
+ <_RefAssemblyPath Include="%(_ReferencesFromRAR.ResolvedPath)%3B" Condition=" '%(_ReferencesFromRAR.Type)' == 'assembly' And '%(_ReferencesFromRAR.PackageName)' != 'Microsoft.Management.Infrastructure' " /> |
|
22 |
+ </ItemGroup> |
|
23 |
+ <WriteLinesToFile File="$(_DependencyFile)" Lines="@(_RefAssemblyPath)" Overwrite="true" /> |
|
24 |
+ </Target> |
|
25 |
+</Project> |
|
26 |
+EOF |
|
27 |
+dotnet msbuild Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj /t:_GetDependencies "/property:DesignTimeBuild=true;_DependencyFile=$(pwd)/TypeCatalogGen/powershell.inc" /nologo |
|
28 |
+popd |
|
29 |
+ |
|
30 |
+pushd src/TypeCatalogGen |
|
31 |
+dotnet restore |
|
32 |
+dotnet run ../System.Management.Automation/CoreCLR/CorePsTypeCatalog.cs powershell.inc |
|
33 |
+popd |
|
34 |
+ |
|
35 |
+#build libpsl |
|
36 |
+pushd src/libpsl-native |
|
37 |
+cmake -DCMAKE_BUILD_TYPE=Debug . |
|
38 |
+make -j |
|
39 |
+popd |
|
40 |
+ |
|
41 |
+# |
|
42 |
+touch DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY |
|
43 |
+dotnet publish /property:GenerateFullPaths=true --configuration Linux --framework netcoreapp2.0 --runtime linux-x64 src/powershell-unix --output bin |
0 | 44 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,54 @@ |
0 |
+Summary: PowerShell is an automation and configuration management platform. |
|
1 |
+Name: powershell |
|
2 |
+Version: 6.0.1 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+Vendor: VMware, Inc. |
|
5 |
+Distribution: Photon |
|
6 |
+License: MIT |
|
7 |
+Url: https://microsoft.com/powershell |
|
8 |
+Group: shells |
|
9 |
+Source0: %{name}-%{version}.tar.gz |
|
10 |
+%define sha1 powershell=2aac40c972f45d1abb3a8b3a4d8a87fcbe91b889 |
|
11 |
+Source1: build.sh |
|
12 |
+BuildArch: x86_64 |
|
13 |
+BuildRequires: dotnet-sdk = 2.1.4 |
|
14 |
+BuildRequires: dotnet-runtime = 2.0.5 |
|
15 |
+BuildRequires: cmake |
|
16 |
+BuildRequires: clang |
|
17 |
+BuildRequires: git |
|
18 |
+Requires: dotnet-runtime |
|
19 |
+Requires: icu |
|
20 |
+ |
|
21 |
+%description |
|
22 |
+PowerShell is an automation and configuration management platform. |
|
23 |
+It consists of a cross-platform command-line shell and associated scripting language. |
|
24 |
+ |
|
25 |
+%prep |
|
26 |
+%setup -qn PowerShell |
|
27 |
+sed -i 's/2.0.2/2.1.4/' global.json |
|
28 |
+ |
|
29 |
+%build |
|
30 |
+cp %{SOURCE1} . |
|
31 |
+chmod +x ./build.sh |
|
32 |
+./build.sh |
|
33 |
+ |
|
34 |
+%install |
|
35 |
+rm -rf src/powershell-unix/bin/{Debug, Linux} |
|
36 |
+mkdir -p %{buildroot}%{_libdir}/powershell |
|
37 |
+mkdir -p %{buildroot}%{_docdir}/powershell |
|
38 |
+mv src/powershell-unix/bin/license_thirdparty_proprietary.txt %{buildroot}%{_docdir}/powershell |
|
39 |
+cp -r src/powershell-unix/bin/* %{buildroot}/%{_libdir}/powershell |
|
40 |
+mkdir -p %{buildroot}%{_bindir} |
|
41 |
+ln -sf %{_libdir}/powershell/pwsh %{buildroot}%{_bindir}/pwsh |
|
42 |
+ |
|
43 |
+ |
|
44 |
+%files |
|
45 |
+ %defattr(-,root,root,0755) |
|
46 |
+ %exclude %{_libdir}/debug |
|
47 |
+ %{_libdir}/* |
|
48 |
+ %{_bindir}/pwsh |
|
49 |
+ %{_docdir}/* |
|
50 |
+ |
|
51 |
+%changelog |
|
52 |
+* Wed Jan 31 2018 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 6.0.1-1 |
|
53 |
+- Initial build for photon |