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>
12 netstandard-targeting-pack
18 _bootstrapver=7.0.102-4
20 url=https://www.microsoft.com/net/core
41 optdepends=('bash-completion: Bash completion support')
46 _tag=276c71d299f6f6dcc3abfd6b3f1fb90c667b4aaa
48 dotnet-installer::git+https://github.com/dotnet/installer.git#tag=${_tag}
49 https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.${_bootstrapver}.tar.gz
50 https://github.com/dotnet/runtime/commit/31e4f404c218eae7ba999c4df5346d30f971451c.patch
53 noextract=(Private.SourceBuilt.Artifacts.${_bootstrapver}.tar.gz)
55 'bbfb246342116aa57dd95673bf5130e4b2f42a5301ba4009683254189e18e1c0af32c373d68a101749b20667353eb77ff792c20a3336ef53a7b1eb2646ea5304'
56 '36e3dcba3be4d6c3a77cdb92287acaaae681078730d9e94dce3025e926b9691c4439a8b790ca4ece643b8162bdcd7d93d2a3860610841f0b282e8e21c0873446'
57 '4a64e3ee550e296bdde894f9202c6f372934cc29154f47d302599b4c368825a96a7b786faa6109a24a1101ff130fd9e4d0ccba094ec91e7f2ca645725bf71b34')
62 git remote set-url origin https://github.com/dotnet/installer.git
68 if [[ $(git describe --tags) != v7.0.* ]]; then
69 msg "Invalid SDK version"
73 local _standardver=$(xmllint --xpath "//*[local-name()='NETStandardLibraryRefPackageVersion']/text()" eng/Versions.props)
75 if [[ $_standardver != 2.1.0 ]]; then
76 msg "Invalid Standard version '$_standardver'"
80 local _newbootstrapver=$(xmllint --xpath "//*[local-name()='PrivateSourceBuiltArtifactsPackageVersion']/text()" eng/Versions.props)
82 if [[ $_newbootstrapver != $_bootstrapver ]]; then
83 msg "Invalid Bootstrap version '$_newbootstrapver'"
87 local _sdkver=$(xmllint --xpath "//*[local-name()='VersionSDKMinor']/text()" eng/Versions.props)$(xmllint --xpath "//*[local-name()='VersionFeature']/text()" eng/Versions.props)
88 local _runtimever=$(xmllint --xpath "//*[local-name()='MicrosoftNETCoreAppRuntimewinx64PackageVersion']/text()" eng/Versions.props)
90 echo "${_runtimever}.sdk${_sdkver}"
94 export COMPlus_LTTng=0
96 export OPENSSL_ENABLE_SHA1_SIGNATURES=1
98 CFLAGS=$(echo $CFLAGS | sed -e 's/-fstack-clash-protection//' )
99 CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-fstack-clash-protection//' )
100 export EXTRA_CFLAGS="$CFLAGS"
101 export EXTRA_CXXFLAGS="$CXXFLAGS"
102 export EXTRA_LDFLAGS="$LDFLAGS"
110 /p:ArcadeBuildTarball=true \
111 /p:TarballDir="${srcdir}"/sources
116 sed -i -E 's|( /p:BuildDebPackage=false)|\1 /p:EnablePackageValidation=false|' eng/SourceBuild.props
117 sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' eng/SourceBuild.props
118 # https://github.com/dotnet/runtime/issues/79196
119 patch -Np1 -i "${srcdir}"/31e4f404c218eae7ba999c4df5346d30f971451c.patch
122 ln -sf "${srcdir}"/Private.SourceBuilt.Artifacts.${_bootstrapver}.tar.gz packages/archive/
124 ./prep.sh --bootstrap
128 /p:ContinueOnPrebuiltBaselineError=true \
130 /p:MinimalConsoleLogOutput=false \
131 /p:PrebuiltPackagesPath="${srcdir}"/sources/packages \
132 /p:SkipPortableRuntimeBuild=true
135 package_dotnet-host() {
136 pkgdesc='A generic driver for the .NET Core Command Line Interface'
141 optdepends=('bash-completion: Bash completion support')
143 cd sources/artifacts/x64/Release
145 install -dm 755 "${pkgdir}"/{etc/profile.d,usr/{bin,lib,share/{dotnet,licenses/dotnet-host}}}
146 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner dotnet host
147 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/licenses/dotnet-host/ --no-same-owner LICENSE.txt ThirdPartyNotices.txt
148 ln -s /usr/share/dotnet/dotnet "${pkgdir}"/usr/bin/dotnet
149 ln -s /usr/share/dotnet/host/fxr/${pkgver%.sdk*}/libhostfxr.so "${pkgdir}"/usr/lib/libhostfxr.so
150 install -Dm 644 ../../../src/sdk/scripts/register-completions.bash "${pkgdir}"/usr/share/bash-completion/completions/dotnet
151 install -Dm 644 ../../../src/sdk/scripts/register-completions.zsh "${pkgdir}"/usr/share/zsh/site-functions/_dotnet
152 install -Dm 644 ../../../../dotnet.sh -t "${pkgdir}"/etc/profile.d/
155 package_dotnet-runtime() {
156 pkgdesc='The .NET Core runtime'
168 optdepends=('lttng-ust2.12: CoreCLR tracing')
169 provides=(dotnet-runtime-7.0)
170 conflicts=(dotnet-runtime-7.0)
172 cd sources/artifacts/x64/Release
174 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
175 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner shared/Microsoft.NETCore.App
176 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/dotnet-runtime
179 package_aspnet-runtime() {
180 pkgdesc='The ASP.NET Core runtime'
181 depends=(dotnet-runtime)
182 provides=(aspnet-runtime-7.0)
183 conflicts=(aspnet-runtime-7.0)
185 cd sources/artifacts/x64/Release
187 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
188 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner shared/Microsoft.AspNetCore.App
189 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/aspnet-runtime
192 package_dotnet-sdk() {
193 pkgdesc='The .NET Core SDK'
196 dotnet-targeting-pack
199 netstandard-targeting-pack
201 optdepends=('aspnet-targeting-pack: Build ASP.NET Core applications')
202 provides=(dotnet-sdk-7.0)
203 conflicts=(dotnet-sdk-7.0)
205 cd sources/artifacts/x64/Release
207 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
208 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner sdk sdk-manifests templates
209 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/dotnet-sdk
212 package_netstandard-targeting-pack() {
213 pkgdesc='The .NET Standard targeting pack'
214 provides=(netstandard-targeting-pack-2.1)
215 conflicts=(netstandard-targeting-pack-2.1)
217 cd sources/artifacts/x64/Release
219 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
220 bsdtar -xf dotnet-sdk-${pkgver%.*.sdk*}.${pkgver#*sdk}-arch-x64.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner packs/NETStandard.Library.Ref
221 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/netstandard-targeting-pack
224 package_dotnet-targeting-pack() {
225 pkgdesc='The .NET Core targeting pack'
226 depends=(netstandard-targeting-pack)
227 provides=(dotnet-targeting-pack-7.0)
228 conflicts=(dotnet-targeting-pack-7.0)
230 cd sources/artifacts/x64/Release
232 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
233 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}
234 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/dotnet-targeting-pack
237 package_aspnet-targeting-pack() {
238 pkgdesc='The ASP.NET Core targeting pack'
239 depends=(dotnet-targeting-pack)
240 provides=(aspnet-targeting-pack-7.0)
241 conflicts=(aspnet-targeting-pack-7.0)
243 cd sources/artifacts/x64/Release
245 install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses}
246 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
247 ln -s dotnet-host "${pkgdir}"/usr/share/licenses/aspnet-targeting-pack