aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Matei Pintilie <luca@lucamatei.com>2024-02-03 12:51:13 +0000
committerLuca Matei Pintilie <luca@lucamatei.com>2024-06-15 12:55:29 +0000
commitbf0f51c0f77986665c8f01049675802475e83081 (patch)
tree77a09f3010f5f584f34cf166124c480a08a3b0ff
parenta0cb8ea4285ef6aaa87373d273cca487e955d02a (diff)
downloadvoid-packages-bf0f51c0f77986665c8f01049675802475e83081.tar
void-packages-bf0f51c0f77986665c8f01049675802475e83081.tar.gz
void-packages-bf0f51c0f77986665c8f01049675802475e83081.tar.bz2
void-packages-bf0f51c0f77986665c8f01049675802475e83081.tar.lz
void-packages-bf0f51c0f77986665c8f01049675802475e83081.tar.xz
void-packages-bf0f51c0f77986665c8f01049675802475e83081.tar.zst
void-packages-bf0f51c0f77986665c8f01049675802475e83081.zip
New package: dotnet-sdk-8.0.6.
l---------srcpkgs/aspnetcore-runtime1
l---------srcpkgs/dotnet-runtime1
-rw-r--r--srcpkgs/dotnet-sdk/patches/sdk_telemetry-output.patch33
-rw-r--r--srcpkgs/dotnet-sdk/template74
4 files changed, 109 insertions, 0 deletions
diff --git a/srcpkgs/aspnetcore-runtime b/srcpkgs/aspnetcore-runtime
new file mode 120000
index 00000000000..121eb4adae7
--- /dev/null
+++ b/srcpkgs/aspnetcore-runtime
@@ -0,0 +1 @@
+dotnet-sdk \ No newline at end of file
diff --git a/srcpkgs/dotnet-runtime b/srcpkgs/dotnet-runtime
new file mode 120000
index 00000000000..121eb4adae7
--- /dev/null
+++ b/srcpkgs/dotnet-runtime
@@ -0,0 +1 @@
+dotnet-sdk \ No newline at end of file
diff --git a/srcpkgs/dotnet-sdk/patches/sdk_telemetry-output.patch b/srcpkgs/dotnet-sdk/patches/sdk_telemetry-output.patch
new file mode 100644
index 00000000000..864afa4d4ef
--- /dev/null
+++ b/srcpkgs/dotnet-sdk/patches/sdk_telemetry-output.patch
@@ -0,0 +1,33 @@
+From 20472f229151ca848196a1d3276d9685cad662a0 Mon Sep 17 00:00:00 2001
+From: Luca Matei Pintilie <luca@lucamatei.com>
+Date: Thu, 6 Jul 2023 21:02:59 +0200
+Subject: [PATCH] SDK telemetry optout
+
+Disables telemetry by default.
+
+Patch copied from Alpine Linux
+and authored by Antoine Martin <dev@ayakael.net>
+---
+ src/sdk/src/Cli/dotnet/Program.cs | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/sdk/src/Cli/dotnet/Program.cs b/src/sdk/src/Cli/dotnet/Program.cs
+index 32a9f4ccc6..ac3f5fd293 100644
+--- a/src/sdk/src/Cli/dotnet/Program.cs
++++ b/src/sdk/src/Cli/dotnet/Program.cs
+@@ -27,6 +27,12 @@ public class Program
+
+ public static int Main(string[] args)
+ {
++ // opt out of telemetry by default if the env var is unset
++ string telemetryValue = Environment.GetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT");
++ if (String.IsNullOrEmpty(telemetryValue))
++ {
++ Environment.SetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1");
++ }
+ using AutomaticEncodingRestorer _ = new();
+
+ // Setting output encoding is not available on those platforms
+--
+2.41.0
+
diff --git a/srcpkgs/dotnet-sdk/template b/srcpkgs/dotnet-sdk/template
new file mode 100644
index 00000000000..e8b165c7e46
--- /dev/null
+++ b/srcpkgs/dotnet-sdk/template
@@ -0,0 +1,74 @@
+# Template file for 'dotnet-sdk'
+pkgname=dotnet-sdk
+version=8.0.6
+revision=1
+archs="x86_64"
+hostmakedepends="curl python3 clang cmake tar jq"
+makedepends="llvm15 mit-krb5-devel lttng-ust-devel icu-devel"
+depends="icu-libs"
+short_desc=".NET is the free framework for building apps and powerful services"
+maintainer="Luca Matei Pintilie <luca@lucamatei.com>"
+license="MIT"
+homepage="https://dotnet.microsoft.com/en-us/"
+changelog="https://github.com/dotnet/dotnet/releases/"
+distfiles="https://github.com/dotnet/dotnet/archive/refs/tags/v${version}.tar.gz
+ https://github.com/dotnet/dotnet/releases/download/v${version}/release.json"
+checksum="042d4ae618d3761744606902df68170df751e80dd654156f4caa9bb25138d1f7
+ 2391ec08e7ac922f418798c2a2ae037196e0b484f638331f4a904ec06b31039f"
+skip_extraction="release.json"
+
+# Private stuff used throughout below
+_libbase="/usr/lib/dotnet"
+_binbase="/usr/bin/dotnet"
+_rid="x64"
+_releasepath="$XBPS_SRCDISTDIR/$pkgname-$version/release.json"
+
+pre_build() {
+ bash ./prep.sh
+}
+
+do_build() {
+ PATH="/usr/libexec/chroot-git:${PATH}"
+ DOTNET_CLI_TELEMETRY_OPTOUT=1
+ bash ./build.sh \
+ --clean-while-building \
+ --online \
+ --source-repository "$(jq -r .sourceRepository "${_releasepath}")" \
+ --source-version "$(jq -r .sourceVersion "${_releasepath}")"
+}
+
+do_install() {
+ mkdir -p "${DESTDIR}${_libbase}"
+ tar xvf "artifacts/${_rid}/Release/dotnet-sdk-$(jq -r .sdkVersion "${_releasepath}")-void-${_rid}.tar.gz" -C "${DESTDIR}${_libbase}"
+ mkdir -p "${DESTDIR}/usr/bin"
+ ln -s "$_libbase/dotnet" "$DESTDIR$_binbase"
+ mkdir -p "$DESTDIR/etc/dotnet"
+ echo "$_libbase" > "$DESTDIR/etc/dotnet/install_location"
+}
+
+post_install() {
+ vlicense "LICENSE.TXT"
+ vlicense "THIRD-PARTY-NOTICES.txt"
+}
+
+dotnet-runtime_package() {
+ short_desc+=" - runtime"
+ depends="icu-libs"
+ pkg_install() {
+ mkdir -p "${PKGDESTDIR}${_libbase}"
+ tar xvf "artifacts/${_rid}/Release/dotnet-runtime-${version}-void-${_rid}.tar.gz" -C "${PKGDESTDIR}${_libbase}"
+ mkdir -p "${PKGDESTDIR}/usr/bin"
+ ln -s "$_libbase/dotnet" "$PKGDESTDIR$_binbase"
+ mkdir -p "$PKGDESTDIR/etc/dotnet"
+ echo "$_libbase" > "$PKGDESTDIR/etc/dotnet/install_location"
+ }
+}
+
+aspnetcore-runtime_package() {
+ short_desc+=" - aspnetcore-runtime"
+ depends="dotnet-runtime>=${version}_${revision}"
+ pkg_install() {
+ mkdir -p "${PKGDESTDIR}${_libbase}"
+ tar xvf "artifacts/${_rid}/Release/aspnetcore-runtime-${version}-void-${_rid}.tar.gz" -C "${PKGDESTDIR}${_libbase}"
+ }
+}