Skip to content

Commit 979cb12

Browse files
Simplify and remove unecessary code.
1 parent 58daf99 commit 979cb12

File tree

2 files changed

+18
-34
lines changed

2 files changed

+18
-34
lines changed

Diff for: cross/dotnet8-runtime/Makefile

+9-17
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PKG_NAME = aspnetcore-runtime
22
PKG_VERS = 8.0.12
33
PKG_EXT = tar.gz
4-
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS)-$(PKG_DIST_ARCH).$(PKG_EXT)
4+
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS)-linux-$(PKG_DIST_ARCH).$(PKG_EXT)
55
PKG_DIST_SITE = https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$(PKG_VERS)
66
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
77
EXTRACT_PATH = $(WORK_DIR)/$(PKG_DIR)
@@ -10,22 +10,14 @@ include ../../mk/spksrc.archs.mk
1010

1111
# use digests with multiple files and individual dist names
1212
# both lists must have the same order
13-
PKG_DIST_ARCH_LIST = linux-x64 linux-arm linux-arm64
14-
PKG_DIST_SITE_LIST = $(PKG_NAME)-$(PKG_VERS)-linux-x64.$(PKG_EXT)
15-
PKG_DIST_SITE_LIST += $(PKG_NAME)-$(PKG_VERS)-linux-arm.$(PKG_EXT)
16-
PKG_DIST_SITE_LIST += $(PKG_NAME)-$(PKG_VERS)-linux-arm64.$(PKG_EXT)
17-
18-
ifeq ($(findstring $(ARCH), $(x64_ARCHS)),$(ARCH))
19-
PKG_DIST_ARCH = $(word 1,$(PKG_DIST_ARCH_LIST))
20-
PKG_DIST_FOLDER = $(shell echo $(word 1,$(PKG_DIST_SITE_LIST)) | grep -o1P ".*/download/pr/\K([^/]*/[^/]*)")
21-
endif
22-
ifeq ($(findstring $(ARCH), $(ARMv7_ARCHS)),$(ARCH))
23-
PKG_DIST_ARCH = $(word 2,$(PKG_DIST_ARCH_LIST))
24-
PKG_DIST_FOLDER = $(shell echo $(word 2,$(PKG_DIST_SITE_LIST)) | grep -o1P ".*/download/pr/\K([^/]*/[^/]*)")
25-
endif
26-
ifeq ($(findstring $(ARCH), $(ARMv8_ARCHS)),$(ARCH))
27-
PKG_DIST_ARCH = $(word 3,$(PKG_DIST_ARCH_LIST))
28-
PKG_DIST_FOLDER = $(shell echo $(word 3,$(PKG_DIST_SITE_LIST)) | grep -o1P ".*/download/pr/\K([^/]*/[^/]*)")
13+
PKG_DIST_ARCH_LIST = x64 arm arm64
14+
15+
ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH))
16+
PKG_DIST_ARCH = x64
17+
else ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH))
18+
PKG_DIST_ARCH = arm
19+
else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
20+
PKG_DIST_ARCH = arm64
2921
endif
3022

3123
ifeq ($(PKG_DIST_ARCH),)

Diff for: cross/dotnet9-runtime/Makefile

+9-17
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PKG_NAME = aspnetcore-runtime
22
PKG_VERS = 9.0.1
33
PKG_EXT = tar.gz
4-
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS)-$(PKG_DIST_ARCH).$(PKG_EXT)
4+
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS)-linux-$(PKG_DIST_ARCH).$(PKG_EXT)
55
PKG_DIST_SITE = https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$(PKG_VERS)
66
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
77
EXTRACT_PATH = $(WORK_DIR)/$(PKG_DIR)
@@ -10,22 +10,14 @@ include ../../mk/spksrc.archs.mk
1010

1111
# use digests with multiple files and individual dist names
1212
# both lists must have the same order
13-
PKG_DIST_ARCH_LIST = linux-x64 linux-arm linux-arm64
14-
PKG_DIST_SITE_LIST = $(PKG_NAME)-$(PKG_VERS)-linux-x64.$(PKG_EXT)
15-
PKG_DIST_SITE_LIST += $(PKG_NAME)-$(PKG_VERS)-linux-arm.$(PKG_EXT)
16-
PKG_DIST_SITE_LIST += $(PKG_NAME)-$(PKG_VERS)-linux-arm64.$(PKG_EXT)
17-
18-
ifeq ($(findstring $(ARCH), $(x64_ARCHS)),$(ARCH))
19-
PKG_DIST_ARCH = $(word 1,$(PKG_DIST_ARCH_LIST))
20-
PKG_DIST_FOLDER = $(shell echo $(word 1,$(PKG_DIST_SITE_LIST)) | grep -o1P ".*/download/pr/\K([^/]*/[^/]*)")
21-
endif
22-
ifeq ($(findstring $(ARCH), $(ARMv7_ARCHS)),$(ARCH))
23-
PKG_DIST_ARCH = $(word 2,$(PKG_DIST_ARCH_LIST))
24-
PKG_DIST_FOLDER = $(shell echo $(word 2,$(PKG_DIST_SITE_LIST)) | grep -o1P ".*/download/pr/\K([^/]*/[^/]*)")
25-
endif
26-
ifeq ($(findstring $(ARCH), $(ARMv8_ARCHS)),$(ARCH))
27-
PKG_DIST_ARCH = $(word 3,$(PKG_DIST_ARCH_LIST))
28-
PKG_DIST_FOLDER = $(shell echo $(word 3,$(PKG_DIST_SITE_LIST)) | grep -o1P ".*/download/pr/\K([^/]*/[^/]*)")
13+
PKG_DIST_ARCH_LIST = x64 arm arm64
14+
15+
ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH))
16+
PKG_DIST_ARCH = x64
17+
else ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH))
18+
PKG_DIST_ARCH = arm
19+
else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
20+
PKG_DIST_ARCH = arm64
2921
endif
3022

3123
ifeq ($(PKG_DIST_ARCH),)

0 commit comments

Comments
 (0)