-
-
Save vitaliikuzhdin/452e2589fc5a24efc7b0c6d431b27e37 to your computer and use it in GitHub Desktop.
aur/dotnet-core-preview-bin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ["dotnet-core-preview-bin"] | |
| source = "jq" | |
| url = "https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json" | |
| filter = '.["releases-index"][] | "\(.["latest-runtime"] | split("-")[0]).sdk\(.["latest-sdk"] | sub("^[0-9]+\\.[0-9]+\\."; ""))"' | |
| from_pattern = '-([A-Za-z]+)\.' | |
| to_pattern = '\1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set location for AppHost lookup | |
| [ -z "$DOTNET_ROOT" ] && export DOTNET_ROOT=/usr/share/dotnet | |
| # Add dotnet directory to PATH, according to docs it must be added, plus VSCode C# Dev Kit doesn't work without this. | |
| # See https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#set-environment-variables-system-wide | |
| case "$PATH" in | |
| *"$DOTNET_ROOT"* ) true ;; | |
| * ) PATH="$PATH:$DOTNET_ROOT" ;; | |
| esac | |
| # Add dotnet tools directory to PATH | |
| [ -z "$DOTNET_TOOLS_PATH" ] && export DOTNET_TOOLS_PATH="$HOME/.dotnet/tools" | |
| case "$PATH" in | |
| *"$DOTNET_TOOLS_PATH"* ) true ;; | |
| * ) PATH="$PATH:$DOTNET_TOOLS_PATH" ;; | |
| esac | |
| # Extract self-contained executables under HOME to avoid multi-user issues from using the default '/var/tmp' | |
| [ -z "$DOTNET_BUNDLE_EXTRACT_BASE_DIR" ] && export DOTNET_BUNDLE_EXTRACT_BASE_DIR="${XDG_CACHE_HOME:-"$HOME"/.cache}/dotnet_bundle_extract" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Maintainer: Vitalii Kuzhdin <vitaliikuzhdin@gmail.com> | |
| _suffix="-preview" | |
| pkgbase="dotnet-core${_suffix}-bin" | |
| pkgname=( | |
| "dotnet-host${_suffix}-bin" | |
| "dotnet-runtime${_suffix}-bin" | |
| "aspnet-runtime${_suffix}-bin" | |
| "dotnet-targeting-pack${_suffix}-bin" | |
| "aspnet-targeting-pack${_suffix}-bin" | |
| "dotnet-sdk${_suffix}-bin" | |
| ) | |
| pkgver=11.0.0.sdk100preview4.26230.115 | |
| _runtimever="$(sed -E 's/\.sdk[0-9]+([A-Za-z]+)/-\1./g; s/\.sdk.*//' <<< "${pkgver}")" | |
| _dotnetver="$(cut -d. -f1,2 <<< "${_runtimever%%-*}")" | |
| _sdkver="$(sed -E 's/([0-9]+)\.sdk([0-9]+)([A-Za-z]+)/\2-\3./g; s/[0-9]+\.sdk//g' <<< "${pkgver}")" | |
| pkgrel=1 | |
| epoch=1 | |
| declare -Ag _arch=( | |
| ['aarch64']='arm64' | |
| ['armv7h']='arm' | |
| ['x86_64']='x64' | |
| ) | |
| arch=( | |
| "${!_arch[@]}" | |
| ) | |
| url="https://dotnet.microsoft.com" | |
| license=( | |
| 'MIT' | |
| ) | |
| options=( | |
| 'staticlibs' | |
| ) | |
| source=( | |
| "dotnet.sh" | |
| ) | |
| for _carch in "${!_arch[@]}"; do | |
| eval " | |
| source_${_carch}=( | |
| 'https://builds.dotnet.microsoft.com/dotnet/Sdk/${_sdkver}/dotnet-sdk-${_sdkver}-linux-${_arch[${_carch}]}.tar.gz' | |
| )" | |
| done | |
| sha512sums=('768151c7179fb6a126b3de9cae01e363e8894f6fab384b1e2c5066c2adca4578638983b1b62aea10dd18045e6d6e8f8ea13280481134de94f004a118919b2c06') | |
| sha512sums_aarch64=('f0488bfd17cc9dbb53cf4390505ffde58efd286af8d9599f53b6c652990c726dcf7bba0499982aa9e2d9fe2208f43166d145ec80ac26397047ae178f28d0e2f3') | |
| sha512sums_x86_64=('f4c74518bc9c8b92b18fbae299c7916b16d8ffad0f3e1768fb76f8c3b7b4ad3875bb8718ae2311083324fa8d58d6adcfcc3e4aed177f269432b72e7b3a9dd8ae') | |
| sha512sums_armv7h=('005eac84e3e16aaeeb4377e3b882ab9ce3af076735ca5aae7230c4f61c185365438d05e4f05945c8d5c31ceed356e184b55e8feb046b01dcad651e85fe0913c8') | |
| package_dotnet-host-preview-bin() { | |
| pkgdesc='A generic driver for the .NET Core Command Line Interface' | |
| depends=( | |
| 'glibc' | |
| 'libgcc' | |
| 'libstdc++' | |
| 'sh' | |
| ) | |
| provides=( | |
| "${pkgname%-bin}=${pkgver}" | |
| "${pkgname%${_suffix}-bin}=${pkgver}" | |
| ) | |
| conflicts=( | |
| "${pkgname%${_suffix}-bin}" | |
| ) | |
| install -vd "${pkgdir}/usr/share/dotnet" \ | |
| "${pkgdir}/usr/share/licenses/dotnet-host" \ | |
| "${pkgdir}/usr/bin" \ | |
| "${pkgdir}/usr/lib" | |
| cd "${srcdir}" | |
| install -vDm644 "dotnet.sh" -t "${pkgdir}/etc/profile.d" | |
| cp -a --parents --no-preserve=ownership -t "${pkgdir}/usr/share/dotnet" \ | |
| "host/fxr/${_runtimever}" \ | |
| "dotnet" \ | |
| "dnx" | |
| cp -a --parents --no-preserve=ownership -t "${pkgdir}/usr/share/licenses/dotnet-host" \ | |
| "LICENSE.txt" \ | |
| "ThirdPartyNotices.txt" | |
| ln -vsf "/usr/share/dotnet/dotnet" "${pkgdir}/usr/bin/dotnet" | |
| ln -vsf "/usr/share/dotnet/dnx" "${pkgdir}/usr/bin/dnx" | |
| ln -vsf "/usr/share/dotnet/host/fxr/${_runtimever}/libhostfxr.so" "${pkgdir}/usr/lib/libhostfxr.so" | |
| } | |
| package_dotnet-runtime-preview-bin() { | |
| pkgdesc="The .NET Core runtime" | |
| depends=( | |
| "dotnet-host>=${pkgver}" | |
| 'glibc' | |
| 'icu' | |
| 'krb5' | |
| 'libgcc' | |
| 'libstdc++' | |
| 'libunwind' | |
| 'openssl' | |
| 'zlib' | |
| ) | |
| optdepends=( | |
| 'lttng-ust2.12: CoreCLR tracing' | |
| ) | |
| provides=( | |
| "${pkgname%-bin}=${pkgver}" | |
| "${pkgname%${_suffix}-bin}-${_dotnetver}=${pkgver}" | |
| ) | |
| conflicts=( | |
| "${pkgname%-bin}" | |
| "${pkgname%${_suffix}-bin}-${_dotnetver}" | |
| ) | |
| install -vd "${pkgdir}/usr/share/dotnet" \ | |
| "${pkgdir}/usr/share/licenses" | |
| cd "${srcdir}" | |
| cp -a --parents --no-preserve=ownership -t "${pkgdir}/usr/share/dotnet" \ | |
| "shared/Microsoft.NETCore.App/${_runtimever}" | |
| ln -vsf "dotnet-host" "${pkgdir}/usr/share/licenses/${pkgname%-bin}" | |
| ln -vsf "dotnet-host" "${pkgdir}/usr/share/licenses/${pkgname%${_suffix}-bin}-${_dotnetver}" | |
| } | |
| package_aspnet-runtime-preview-bin() { | |
| pkgdesc="The ASP.NET Core runtime" | |
| depends=( | |
| "${pkgname//aspnet/dotnet}>=${epoch}:${pkgver}-${pkgrel}" | |
| ) | |
| provides=( | |
| "${pkgname%-bin}=${pkgver}" | |
| "${pkgname%${_suffix}-bin}-${_dotnetver}=${pkgver}" | |
| ) | |
| conflicts=( | |
| "${pkgname%-bin}" | |
| "${pkgname%${_suffix}-bin}-${_dotnetver}" | |
| ) | |
| install -vd "${pkgdir}/usr/share/dotnet" \ | |
| "${pkgdir}/usr/share/licenses" | |
| cd "${srcdir}" | |
| cp -a --parents --no-preserve=ownership -t "${pkgdir}/usr/share/dotnet" \ | |
| "shared/Microsoft.AspNetCore.App/${_runtimever}" | |
| ln -vsf "dotnet-host" "${pkgdir}/usr/share/licenses/${pkgname%-bin}" | |
| ln -vsf "dotnet-host" "${pkgdir}/usr/share/licenses/${pkgname%${_suffix}-bin}-${_dotnetver}" | |
| } | |
| package_dotnet-targeting-pack-preview-bin() { | |
| pkgdesc="The .NET Core targeting pack" | |
| provides=( | |
| "${pkgname%-bin}=${pkgver}" | |
| "${pkgname%${_suffix}-bin}-${_dotnetver}=${pkgver}" | |
| ) | |
| conflicts=( | |
| "${pkgname%-bin}" | |
| "${pkgname%${_suffix}-bin}-${_dotnetver}" | |
| ) | |
| install -vd "${pkgdir}/usr/share/dotnet" \ | |
| "${pkgdir}/usr/share/licenses" | |
| cd "${srcdir}" | |
| cp -a --parents --no-preserve=ownership -t "${pkgdir}/usr/share/dotnet" \ | |
| "packs/Microsoft.NETCore.App.Host.linux-${_arch[${CARCH}]}/${_runtimever}" \ | |
| "packs/Microsoft.NETCore.App.Ref/${_runtimever}" | |
| ln -vsf "dotnet-host" "${pkgdir}/usr/share/licenses/${pkgname%-bin}" | |
| ln -vsf "dotnet-host" "${pkgdir}/usr/share/licenses/${pkgname%${_suffix}-bin}-${_dotnetver}" | |
| } | |
| package_aspnet-targeting-pack-preview-bin() { | |
| pkgdesc="The ASP.NET Core targeting pack" | |
| depends=( | |
| "${pkgname//aspnet/dotnet}>=${epoch}:${pkgver}-${pkgrel}" | |
| ) | |
| provides=( | |
| "${pkgname%-bin}=${pkgver}" | |
| "${pkgname%${_suffix}-bin}-${_dotnetver}=${pkgver}" | |
| ) | |
| conflicts=( | |
| "${pkgname%-bin}" | |
| "${pkgname%${_suffix}-bin}-${_dotnetver}" | |
| ) | |
| install -vd "${pkgdir}/usr/share/dotnet" \ | |
| "${pkgdir}/usr/share/licenses" | |
| cd "${srcdir}" | |
| cp -a --parents --no-preserve=ownership -t "${pkgdir}/usr/share/dotnet" \ | |
| "packs/Microsoft.AspNetCore.App.Ref/${_runtimever}" | |
| ln -vsf "dotnet-host" "${pkgdir}/usr/share/licenses/${pkgname%-bin}" | |
| ln -vsf "dotnet-host" "${pkgdir}/usr/share/licenses/${pkgname%${_suffix}-bin}-${_dotnetver}" | |
| } | |
| package_dotnet-sdk-preview-bin() { | |
| pkgdesc="The .NET Core SDK" | |
| depends=( | |
| "${pkgname//sdk/runtime}>=${epoch}:${pkgver}-${pkgrel}" | |
| "${pkgname//sdk/targeting-pack}>=${epoch}:${pkgver}-${pkgrel}" | |
| ) | |
| optdepends=( | |
| "${pkgname//sdk/aspnet-targeting-pack}: Build ASP.NET Core applications" | |
| ) | |
| provides=( | |
| "${pkgname%-bin}=${pkgver}" | |
| "${pkgname%${_suffix}-bin}-${_dotnetver}=${pkgver}" | |
| ) | |
| conflicts=( | |
| "${pkgname%-bin}" | |
| "${pkgname%${_suffix}-bin}-${_dotnetver}" | |
| ) | |
| install -vd "${pkgdir}/usr/share/dotnet" \ | |
| "${pkgdir}/usr/share/licenses" | |
| cd "${srcdir}" | |
| cp -a --parents --no-preserve=ownership -t "${pkgdir}/usr/share/dotnet" \ | |
| "sdk/${_sdkver}" \ | |
| "sdk-manifests" \ | |
| "templates/${_runtimever}" | |
| ln -vsf "dotnet-host" "${pkgdir}/usr/share/licenses/${pkgname%-bin}" | |
| ln -vsf "dotnet-host" "${pkgdir}/usr/share/licenses/${pkgname%${_suffix}-bin}-${_dotnetver}" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment