diff --git a/lang/dotnet/Makefile b/lang/dotnet/Makefile --- a/lang/dotnet/Makefile +++ b/lang/dotnet/Makefile @@ -40,6 +40,9 @@ DIST_SUBDIR= dotnet +SUB_FILES= post-install-set-location +PKGPOSTINSTALL= ${WRKDIR}/post-install-set-location + BOOTSTRAP_DOTNETVERSION= 8.0 BOOTSTRAP_SDKVERSION= ${BOOTSTRAP_DOTNETVERSION}.100 BOOTSTRAP_SDKVERSIONSUFFIX= -rtm.23551.1 diff --git a/lang/dotnet/files/post-install-set-location.in b/lang/dotnet/files/post-install-set-location.in new file mode 100644 --- /dev/null +++ b/lang/dotnet/files/post-install-set-location.in @@ -0,0 +1,8 @@ +ETCFILE=/etc/dotnet/install_location +if [ -f ${ETCFILE} ]; then + echo ${ETCFILE} exists, skipping. +else + echo Writing dotnet location to ${ETCFILE} + mkdir -p $(dirname ${ETCFILE}) || exit 1; + echo "%%PREFIX%%/dotnet" >${ETCFILE} +fi