1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: Kristian Mosegaard <kristian@mosen.me>
3 # Contributor: Max Liebkies <mail@maxliebkies.de>
4 # Contributor: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
6 pkgbase=dotnet-core-3.1
11 dotnet-targeting-pack-3.1
12 aspnet-targeting-pack-3.1
17 url=https://www.microsoft.com/net/core
40 options=(staticlibs !lto)
41 _tag=61c1106e21baad31a946238a4aa2b27fde415c97
43 dotnet-source-build::git+https://github.com/dotnet/source-build.git#tag=${_tag}
44 dotnet-source-build-coreclr-tools-path.patch
45 9999-corefx-add-arch-rids.patch
46 9999-corefx-fix-build-clang10.patch
47 9999-core-setup-fix-computed-rid.patch
50 'bd6bba84f851ce25b8dda085af1415acc14e50c6c99712dc03d51cdb3dbb362e7dc0ee16d54b27a1d46eb0db03be5dd0c1dae6c2a8a9ab0e46b2bf6c76292989'
51 '2e56d6458c50c95e5d2489235b13727c8d708162318cad1cc05b225d47d736dbd9bc897eb3eb7014f716423dcfef67178efbdee41be30e64bac120912efeabd4'
52 '831a76ec9c12498edcb0e8085f3f725e8ebecc951c8ae9cbd871330ffb813cce42e03e28c0fe1493cdd629936feff98ae26f48f50435039ac38fbba53a9371ac'
53 'bd9e0cec11937997df2764bccfdb9468af8ffabd85597447a3de52c801cd6c2717fb297f4bad00784568c67b4f1648038cc0ffdccc7f52c63935562bc2f2ef9a')
56 #cp -r /usr/share/dotnet .
58 cd dotnet-source-build
60 patch -Np1 -i ../dotnet-source-build-coreclr-tools-path.patch
62 [ -d patches/corefx ] || mkdir patches/corefx
63 cp ../9999-corefx-add-arch-rids.patch patches/corefx/
64 cp ../9999-corefx-fix-build-clang10.patch patches/corefx/
65 [ -d patches/core-setup ] || mkdir patches/core-setup
66 cp ../9999-core-setup-fix-computed-rid.patch patches/core-setup/
70 cd dotnet-source-build
72 if [[ $(git describe --tags) != v3.1.*-runtime && $(git describe --tags) != v3.1.*-SDK ]]; then
76 local _runtimever=$(xmllint --xpath "//Dependency[@Name='Microsoft.NETCore.App.Runtime.linux-x64']/@Version" eng/Version.Details.xml | cut -d '=' -f 2 | sed 's/^"//; s/"$//')
77 local _sdkver=$(xmllint --xpath "//Dependency[@Name='Microsoft.NET.Sdk']/@Version" eng/Version.Details.xml | cut -d '=' -f 2 | sed 's/^"//; s/"$//; s/-rtm.*//; s/-servicing.*//')
79 echo "${_runtimever}.sdk${_sdkver##*.}"
83 cd dotnet-source-build
85 export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1
88 /p:ArchiveDownloadedPackages=true \
89 /p:ContinueOnPrebuiltBaselineError=true \
90 /p:SkipPortableRuntimeBuild=true \
91 /p:SkipPrebuiltEnforcement=true \
92 /p:UseSystemLibraries=true \
93 /p:UseSystemLibunwind=true
94 #--with-sdk "${srcdir}"/dotnet \
97 package_dotnet-runtime-3.1() {
98 pkgdesc='The .NET Core runtime'
111 optdepends=('lttng-ust2.12: CoreCLR tracing')
113 cd dotnet-source-build/artifacts/x64/Release
115 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
116 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner shared/Microsoft.NETCore.App
117 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/dotnet-runtime-3.1
120 package_aspnet-runtime-3.1() {
121 pkgdesc='The ASP.NET Core runtime'
122 depends=(dotnet-runtime-3.1)
124 cd dotnet-source-build/artifacts/x64/Release
126 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
127 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner shared/Microsoft.AspNetCore.App
128 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/aspnet-runtime-3.1
131 package_dotnet-sdk-3.1() {
132 pkgdesc='The .NET Core SDK'
135 dotnet-targeting-pack-3.1
138 netstandard-targeting-pack
140 optdepends=('aspnet-targeting-pack-3.1: Build ASP.NET Core applications')
142 cd dotnet-source-build/artifacts/x64/Release
144 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
145 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner sdk templates
146 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/dotnet-sdk-3.1
149 package_dotnet-targeting-pack-3.1() {
150 pkgdesc='The .NET Core targeting pack'
151 depends=(netstandard-targeting-pack)
153 cd dotnet-source-build/artifacts/x64/Release
155 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
156 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner packs/Microsoft.NETCore.App.{Host.arch-x64,Ref}
157 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/dotnet-targeting-pack-3.1
160 package_aspnet-targeting-pack-3.1() {
161 pkgdesc='The ASP.NET Core targeting pack'
162 depends=(dotnet-targeting-pack-3.1)
164 cd dotnet-source-build/artifacts/x64/Release
166 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
167 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner packs/Microsoft.AspNetCore.App.Ref
168 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/aspnet-targeting-pack-3.1