Skip to content

Commit

Permalink
dotnet: add dotnet 6.0 runtime (#4976)
Browse files Browse the repository at this point in the history
* dotnet: add dotnet 6.0 runtime
- fix use of PLIST.auto with spksrc.install-resources.mk
- allow multiple files in digests with different urls (dist names)
* dotnet-runtime: update to v6.0.1
* Update to v6.0.3
* fix usage of PLIST.auto
* dotnet-runtime: update to v6.0.4
  • Loading branch information
hgy59 authored Apr 14, 2022
1 parent 9af95ac commit 515cd62
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 1 deletion.
43 changes: 43 additions & 0 deletions cross/dotnet-runtime/Makefile
Original file line number Diff line number Diff line change
@@ -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
Empty file added cross/dotnet-runtime/PLIST.auto
Empty file.
9 changes: 9 additions & 0 deletions cross/dotnet-runtime/digests
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions mk/spksrc.generate-digests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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) ; \
Expand All @@ -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
2 changes: 1 addition & 1 deletion mk/spksrc.plist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
40 changes: 40 additions & 0 deletions spk/dotnet-runtime/Makefile
Original file line number Diff line number Diff line change
@@ -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
Empty file added spk/dotnet-runtime/PLIST
Empty file.
Binary file added spk/dotnet-runtime/src/dotnet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 515cd62

Please sign in to comment.