# Maintainer: Attila Greguss # Co-Maintainer: Nate Plumm pkgbase=dotnet-core-bin pkgname=( 'dotnet-host-bin' 'aspnet-runtime-bin' 'dotnet-runtime-bin' 'dotnet-sdk-bin' 'dotnet-targeting-pack-bin' 'aspnet-targeting-pack-bin' ) # Version the split family by SDK release; dependencies expose runtime versions. pkgver=10.0.401 _runtimever=10.0.12 _sdkver=$pkgver _short_ver=10.0 pkgrel=1 arch=('x86_64' 'armv7h' 'aarch64') url='https://www.microsoft.com/net/core' license=('MIT') options=('staticlibs') source=('dotnet.sh') source_armv7h=("https://builds.dotnet.microsoft.com/dotnet/Sdk/${_sdkver}/dotnet-sdk-${_sdkver}-linux-arm.tar.gz") source_aarch64=("https://builds.dotnet.microsoft.com/dotnet/Sdk/${_sdkver}/dotnet-sdk-${_sdkver}-linux-arm64.tar.gz") source_x86_64=("https://builds.dotnet.microsoft.com/dotnet/Sdk/${_sdkver}/dotnet-sdk-${_sdkver}-linux-x64.tar.gz") sha512sums=('768151c7179fb6a126b3de9cae01e363e8894f6fab384b1e2c5066c2adca4578638983b1b62aea10dd18045e6d6e8f8ea13280481134de94f004a118919b2c06') sha512sums_armv7h=('94a8a52862ca9f0de1075a468d6e4e307a1d4463098a9e8266e66939709a812b0126e212cce7e8c6feae6b078d86c8b77e088814a0e32531edb0da0a1ce90c11') sha512sums_aarch64=('58ace73ced6b4360754689a686bdfb8a317f4da6cb8bb416dbc7d0ba9f47e43e3c09f5eb1f1a1cfaacbd10df9558da4882bf2a5e195d6ab56a02c1f9f76102ed') sha512sums_x86_64=('51c8b999af9e8dd9998c9edc5944e19a90788862068acd38694e098889054ce8c23d4f0c5cccfa16bf187d044562359e5ee69a9f8ad0bbe913ba90311fbce25b') # Keep each split package's notices usable when installed independently. _install_license() { install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" install -Dm644 ThirdPartyNotices.txt "$pkgdir/usr/share/licenses/$pkgname/ThirdPartyNotices.txt" } package_dotnet-host-bin() { pkgdesc='A generic driver for the .NET Core Command Line Interface (binary)' provides=("dotnet-host" "dotnet-host=${_runtimever}") conflicts=('dotnet-host') depends=( 'libgcc' 'libstdc++' 'glibc' ) install -dm 755 "${pkgdir}"/usr/{bin,lib,share/{dotnet,dnx}} cp -dr --no-preserve='ownership' dotnet host dnx "${pkgdir}"/usr/share/dotnet/ _install_license ln -sf /usr/share/dotnet/dotnet "${pkgdir}"/usr/bin/dotnet ln -sf /usr/share/dotnet/dnx "${pkgdir}"/usr/bin/dnx ln -sf /usr/share/dotnet/host/fxr/"${_runtimever}"/libhostfxr.so "${pkgdir}"/usr/lib/libhostfxr.so install -Dm 644 "${srcdir}"/dotnet.sh -t "${pkgdir}"/etc/profile.d/ } package_dotnet-runtime-bin() { pkgdesc='The .NET Core runtime (binary)' depends=( "dotnet-host>=${_runtimever}" 'libgcc' 'libstdc++' 'glibc' 'icu' 'libunwind' 'zlib' 'openssl' ) optdepends=('lttng-ust2.12: CoreCLR tracing') provides=("dotnet-runtime=${_runtimever}" "dotnet-runtime-${_short_ver}") conflicts=("dotnet-runtime=${_runtimever}" "dotnet-runtime-${_short_ver}") install -dm 755 "${pkgdir}"/usr/share/{dotnet/shared,licenses} cp -dr --no-preserve='ownership' shared/Microsoft.NETCore.App "${pkgdir}"/usr/share/dotnet/shared/ _install_license } package_aspnet-runtime-bin() { pkgdesc='The ASP.NET Core runtime (binary)' depends=('dotnet-runtime-bin') provides=("aspnet-runtime=${_runtimever}" "aspnet-runtime-${_short_ver}") conflicts=("aspnet-runtime=${_runtimever}" "aspnet-runtime-${_short_ver}") install -dm 755 "${pkgdir}"/usr/share/{dotnet/shared,licenses} cp -dr --no-preserve='ownership' shared/Microsoft.AspNetCore.App "${pkgdir}"/usr/share/dotnet/shared/ _install_license } package_dotnet-sdk-bin() { pkgdesc='The .NET Core SDK (binary)' depends=( 'glibc' 'libgcc' 'libstdc++' 'dotnet-runtime-bin' 'dotnet-targeting-pack-bin' 'aspnet-runtime-bin' 'aspnet-targeting-pack-bin' ) provides=("dotnet-sdk-bin" "dotnet-sdk=${pkgver}" "dotnet-sdk-${_short_ver}=${pkgver}") conflicts=("dotnet-sdk-bin" "dotnet-sdk=${pkgver}" "dotnet-sdk-${_short_ver}") install -dm 755 "${pkgdir}"/usr/share/{dotnet,licenses} cp -dr --no-preserve='ownership' sdk sdk-manifests templates "${pkgdir}"/usr/share/dotnet/ _install_license } package_dotnet-targeting-pack-bin() { pkgdesc='The .NET Core targeting pack (binary)' provides=(dotnet-targeting-pack=${_runtimever} dotnet-targeting-pack-${_short_ver}) conflicts=(dotnet-targeting-pack=${_runtimever} dotnet-targeting-pack-${_short_ver}) if [ $CARCH = 'x86_64' ]; then msarch=x64; elif [ $CARCH = 'armv7h' ]; then msarch=arm; elif [ $CARCH = 'aarch64' ]; then msarch=arm64; fi install -dm 755 "${pkgdir}"/usr/share/{dotnet,dotnet/packs,licenses} cp -dr --no-preserve='ownership' packs/Microsoft.NETCore.App.{Host.linux-${msarch},Ref} "${pkgdir}"/usr/share/dotnet/packs/ _install_license } package_aspnet-targeting-pack-bin() { pkgdesc='The ASP.NET Core targeting pack (binary)' depends=(dotnet-targeting-pack-bin) provides=(aspnet-targeting-pack=${_runtimever} aspnet-targeting-pack-${_short_ver}) conflicts=(aspnet-targeting-pack=${_runtimever} aspnet-targeting-pack-${_short_ver}) install -dm 755 "${pkgdir}"/usr/share/{dotnet,dotnet/packs,licenses} cp -dr --no-preserve='ownership' packs/Microsoft.AspNetCore.App.Ref "${pkgdir}"/usr/share/dotnet/packs/ _install_license }