diff --git a/cross/dotnet-runtime/Makefile b/cross/dotnet-runtime/Makefile new file mode 100644 index 00000000000..b9b71c30c79 --- /dev/null +++ b/cross/dotnet-runtime/Makefile @@ -0,0 +1,43 @@ +PKG_NAME = aspnetcore-runtime +PKG_VERS = 6.0.4 +PKG_EXT = tar.gz +PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS)-$(PKG_DIST_ARCH).$(PKG_EXT) +PKG_DIST_SITE = https://download.visualstudio.microsoft.com/download/pr/$(PKG_DIST_FOLDER) +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) +EXTRACT_PATH = $(INSTALL_DIR)/$(INSTALL_PREFIX)/share/dotnet + +include ../../mk/spksrc.archs.mk + + +# use digests with multiple files and individual dist names +# both lists must have the same order +PKG_DIST_ARCH_LIST = linux-x64 linux-arm linux-arm64 +PKG_DIST_SITE_LIST = https://download.visualstudio.microsoft.com/download/pr/de3f6658-5d5b-4986-aeb1-7efdf5818437/7df572051df15117a0f52be1b79e1823/$(PKG_NAME)-$(PKG_VERS)-linux-x64.$(PKG_EXT) +PKG_DIST_SITE_LIST += https://download.visualstudio.microsoft.com/download/pr/adc5bbf5-6cf6-4da6-be27-60de0b8739e5/fecb289bd70834203f2397c18c82bbde/$(PKG_NAME)-$(PKG_VERS)-linux-arm.$(PKG_EXT) +PKG_DIST_SITE_LIST += https://download.visualstudio.microsoft.com/download/pr/ba1662bf-50e6-451a-957f-0d55bc6e5713/921fe0e68428ac47c098e97418d3126a/$(PKG_NAME)-$(PKG_VERS)-linux-arm64.$(PKG_EXT) + +ifeq ($(findstring $(ARCH), $(x64_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = $(word 1,$(PKG_DIST_ARCH_LIST)) +PKG_DIST_FOLDER = $(shell echo $(word 1,$(PKG_DIST_SITE_LIST)) | grep -o1P ".*/download/pr/\K([^/]*/[^/]*)") +endif +ifeq ($(findstring $(ARCH), $(ARMv7_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = $(word 2,$(PKG_DIST_ARCH_LIST)) +PKG_DIST_FOLDER = $(shell echo $(word 2,$(PKG_DIST_SITE_LIST)) | grep -o1P ".*/download/pr/\K([^/]*/[^/]*)") +endif +ifeq ($(findstring $(ARCH), $(ARMv8_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = $(word 3,$(PKG_DIST_ARCH_LIST)) +PKG_DIST_FOLDER = $(shell echo $(word 3,$(PKG_DIST_SITE_LIST)) | grep -o1P ".*/download/pr/\K([^/]*/[^/]*)") +endif + +ifeq ($(PKG_DIST_ARCH),) +$(error Unsupported ARCH $(ARCH)) +endif + +HOMEPAGE = https://dotnet.microsoft.com/ +COMMENT = Free. Cross-platform. Open source. A developer platform for building all apps. +LICENSE = MIT + +# source is extracted directly to the install folder +INSTALL_TARGET = nop + +include ../../mk/spksrc.install-resources.mk diff --git a/cross/dotnet-runtime/PLIST.auto b/cross/dotnet-runtime/PLIST.auto new file mode 100644 index 00000000000..e69de29bb2d diff --git a/cross/dotnet-runtime/digests b/cross/dotnet-runtime/digests new file mode 100644 index 00000000000..7d1e18fc4e9 --- /dev/null +++ b/cross/dotnet-runtime/digests @@ -0,0 +1,9 @@ +aspnetcore-runtime-6.0.4-linux-x64.tar.gz SHA1 d455c2c610f2423ad2e6362e6f24b20aac65a2c6 +aspnetcore-runtime-6.0.4-linux-x64.tar.gz SHA256 ca3dc696af0a9fc5c7ce052eba38ecf723cbc30d1dc29d8f85c201eff534d73b +aspnetcore-runtime-6.0.4-linux-x64.tar.gz MD5 e92f384f7debc89b1a817af8ca6abd56 +aspnetcore-runtime-6.0.4-linux-arm.tar.gz SHA1 bc3bc565d01d9578c4b7b8e88cefa6a26d0b10db +aspnetcore-runtime-6.0.4-linux-arm.tar.gz SHA256 f3b41cb4fa50bb195957c53f096817e1ab19f29858a677180145eba064ea49f6 +aspnetcore-runtime-6.0.4-linux-arm.tar.gz MD5 a3ca073240e05d6ca410fc7083a34c42 +aspnetcore-runtime-6.0.4-linux-arm64.tar.gz SHA1 8cde6b4622769d8035dd9bfad3b532c4e2d4d21a +aspnetcore-runtime-6.0.4-linux-arm64.tar.gz SHA256 6d66bf5494f4a54f6f20fe0de1e7a64a6e4eb5e6136b1496ac347d027fd35abe +aspnetcore-runtime-6.0.4-linux-arm64.tar.gz MD5 83c433e6aaaf8d6a4c46df947af98622 diff --git a/mk/spksrc.generate-digests.mk b/mk/spksrc.generate-digests.mk index 6c8119ae18f..f0ce6fe01d5 100644 --- a/mk/spksrc.generate-digests.mk +++ b/mk/spksrc.generate-digests.mk @@ -32,6 +32,10 @@ digests-%: echo "$(LOCAL_FILE) $$type `$$tool $(DIST_FILE) | cut -d\" \" -f1`" >> $(DIGESTS_FILE) ; \ done + +ifeq ($(strip $(PKG_DIST_SITE_LIST)),) + +# download with individual dist archs $(DIGESTS_FILE): download @for pkg_arch in $(PKG_DIST_ARCH_LIST); do \ rm $(DOWNLOAD_COOKIE) ; \ @@ -42,4 +46,19 @@ $(DIGESTS_FILE): download $(MAKE) -s PKG_DIST_ARCH=$${pkg_arch} digests-$${pkg_arch} ; \ done ; \ +else + +# download with individual dist sites +$(DIGESTS_FILE): download + @for pkg_dist_url in $(PKG_DIST_SITE_LIST); do \ + rm $(DOWNLOAD_COOKIE) ; \ + $(MAKE) -s URLS=$${pkg_dist_url} download ; \ + done ; \ + rm -f $(DIGESTS_FILE) && touch -f $(DIGESTS_FILE) ; \ + for pkg_arch in $(PKG_DIST_ARCH_LIST); do \ + $(MAKE) -s PKG_DIST_ARCH=$${pkg_arch} digests-$${pkg_arch} ; \ + done ; \ + +endif + endif diff --git a/mk/spksrc.plist.mk b/mk/spksrc.plist.mk index 4aa49dc49b8..528a939083b 100644 --- a/mk/spksrc.plist.mk +++ b/mk/spksrc.plist.mk @@ -21,7 +21,7 @@ cat_PLIST: # If there is a PLIST.auto file or if parent directory is kernel \ elif [ -f PLIST.auto -o $$(basename $$(dirname $$(pwd))) = "kernel" ] ; \ then \ - cat $(WORK_DIR)/$(PKG_NAME).plist | sort | while read -r file ; \ + cat $(WORK_DIR)/$(PKG_NAME).plist.tmp | sort | while read -r file ; \ do \ type=$$(file --brief "$(INSTALL_DIR)/$(INSTALL_PREFIX)/$$file" | cut -d , -f1) ; \ case $$type in \ diff --git a/spk/dotnet-runtime/Makefile b/spk/dotnet-runtime/Makefile new file mode 100644 index 00000000000..61cfe122315 --- /dev/null +++ b/spk/dotnet-runtime/Makefile @@ -0,0 +1,40 @@ +SPK_NAME = dotnet-runtime +SPK_VERS = 6.0.4 +SPK_REV = 1 +SPK_ICON = src/dotnet.png + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(i686_ARCHS) $(ARMv7L_ARCHS) + +MAINTAINER = hgy59 +DESCRIPTION = Free. Cross-platform. Open source. A developer platform for building all apps. This package installs the dotnet runtime and the asp.net.core runtime. +CHANGELOG = "Initial package release." + +STARTABLE = no +DISPLAY_NAME = .NET 6.0 runtime + +HOMEPAGE = https://dotnet.microsoft.com/ +LICENSE = MIT + +OPTIONAL_DEPENDS = cross/libstdc++ +DEPENDS = cross/libicu cross/dotnet-runtime + +include ../../mk/spksrc.common.mk + +ifeq ($(call version_lt, ${TCVERSION}, 7.0),1) +# we do not only need the updated libstdc++ library, we also need to +# adjust the library search path for dotnet to use this version. +DEPENDS += cross/libstdc++ +POST_STRIP_TARGET = dotnet_patch_target +endif + +SPK_COMMANDS = share/dotnet/dotnet + +include ../../mk/spksrc.spk.mk + +.PHONY: dotnet_patch_target +# Set library path to use bundled libstdc++ +dotnet_patch_target: + @$(MSG) "Set library runpath in dotnet executable." + @sudo apt-get update + @sudo apt-get install -y patchelf + @patchelf --set-rpath /var/packages/$(SPK_NAME)/target/lib $(STAGING_DIR)/share/dotnet/dotnet diff --git a/spk/dotnet-runtime/PLIST b/spk/dotnet-runtime/PLIST new file mode 100644 index 00000000000..e69de29bb2d diff --git a/spk/dotnet-runtime/src/dotnet.png b/spk/dotnet-runtime/src/dotnet.png new file mode 100644 index 00000000000..e7d830b69c0 Binary files /dev/null and b/spk/dotnet-runtime/src/dotnet.png differ