diff --git a/utils/apk/Makefile b/utils/apk/Makefile new file mode 100644 index 000000000..2673f4156 --- /dev/null +++ b/utils/apk/Makefile @@ -0,0 +1,75 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=apk +PKG_VERSION:=2.12.1 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE:=apk-tools-v$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://gitlab.alpinelinux.org/alpine/apk-tools/-/archive/v$(PKG_VERSION) +PKG_HASH:=b191dbd5019e8933b78b66779412e901e9b88fb12c460a22995e342b3efe83eb +PKG_BUILD_DIR:=$(BUILD_DIR)/apk-tools-v$(PKG_VERSION) + +PKG_MAINTAINER:=Paul Spooren +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=LICENSE + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/apk + SECTION:=utils + CATEGORY:=Utilities + TITLE:=apk package manager + DEPENDS:=+zlib +libopenssl @!arc + URL:=$(PKG_SOURCE_URL) +endef + +define Package/alpine-keys + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Alpine apk public signing keys + DEPENDS:=apk +endef + +define Package/alpine-repositories + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Official Alpine repositories + DEPENDS:=apk +endef + +MAKE_FLAGS += LUA=no + +define Package/apk/install + $(INSTALL_DIR) $(1)/lib/apk/db + + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/apk $(1)/bin/apk + + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apk.pc \ + $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DIR) $(1)/etc/apk/ + echo $(ARCH) > $(1)/etc/apk/arch + touch $(1)/etc/apk/world +endef + +define Package/alpine-keys/install + $(INSTALL_DIR) $(1)/etc/apk/keys + $(INSTALL_DATA) ./files/alpine-keys/* $(1)/etc/apk/keys +endef + +define Package/alpine-repositories/install + $(INSTALL_DIR) $(1)/etc/apk/keys + $(INSTALL_DATA) ./files/alpine-repositories $(1)/etc/apk/repositories +endef + +$(eval $(call BuildPackage,apk)) +$(eval $(call BuildPackage,alpine-keys)) +$(eval $(call BuildPackage,alpine-repositories)) diff --git a/utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub b/utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub new file mode 100644 index 000000000..bb4bdc80f --- /dev/null +++ b/utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1yHJxQgsHQREclQu4Ohe +qxTxd1tHcNnvnQTu/UrTky8wWvgXT+jpveroeWWnzmsYlDI93eLI2ORakxb3gA2O +Q0Ry4ws8vhaxLQGC74uQR5+/yYrLuTKydFzuPaS1dK19qJPXB8GMdmFOijnXX4SA +jixuHLe1WW7kZVtjL7nufvpXkWBGjsfrvskdNA/5MfxAeBbqPgaq0QMEfxMAn6/R +L5kNepi/Vr4S39Xvf2DzWkTLEK8pcnjNkt9/aafhWqFVW7m3HCAII6h/qlQNQKSo +GuH34Q8GsFG30izUENV9avY7hSLq7nggsvknlNBZtFUcmGoQrtx3FmyYsIC8/R+B +ywIDAQAB +-----END PUBLIC KEY----- diff --git a/utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub b/utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub new file mode 100644 index 000000000..6cbfad744 --- /dev/null +++ b/utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvNijDxJ8kloskKQpJdx+ +mTMVFFUGDoDCbulnhZMJoKNkSuZOzBoFC94omYPtxnIcBdWBGnrm6ncbKRlR+6oy +DO0W7c44uHKCFGFqBhDasdI4RCYP+fcIX/lyMh6MLbOxqS22TwSLhCVjTyJeeH7K +aA7vqk+QSsF4TGbYzQDDpg7+6aAcNzg6InNePaywA6hbT0JXbxnDWsB+2/LLSF2G +mnhJlJrWB1WGjkz23ONIWk85W4S0XB/ewDefd4Ly/zyIciastA7Zqnh7p3Ody6Q0 +sS2MJzo7p3os1smGjUF158s6m/JbVh4DN6YIsxwl2OjDOz9R0OycfJSDaBVIGZzg +cQIDAQAB +-----END PUBLIC KEY----- diff --git a/utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub b/utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub new file mode 100644 index 000000000..83f0658e9 --- /dev/null +++ b/utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwlzMkl7b5PBdfMzGdCT0 +cGloRr5xGgVmsdq5EtJvFkFAiN8Ac9MCFy/vAFmS8/7ZaGOXoCDWbYVLTLOO2qtX +yHRl+7fJVh2N6qrDDFPmdgCi8NaE+3rITWXGrrQ1spJ0B6HIzTDNEjRKnD4xyg4j +g01FMcJTU6E+V2JBY45CKN9dWr1JDM/nei/Pf0byBJlMp/mSSfjodykmz4Oe13xB +Ca1WTwgFykKYthoLGYrmo+LKIGpMoeEbY1kuUe04UiDe47l6Oggwnl+8XD1MeRWY +sWgj8sF4dTcSfCMavK4zHRFFQbGp/YFJ/Ww6U9lA3Vq0wyEI6MCMQnoSMFwrbgZw +wwIDAQAB +-----END PUBLIC KEY----- diff --git a/utils/apk/files/alpine-repositories b/utils/apk/files/alpine-repositories new file mode 100644 index 000000000..5babbb23b --- /dev/null +++ b/utils/apk/files/alpine-repositories @@ -0,0 +1,3 @@ +https://dl-cdn.alpinelinux.org/alpine/edge/main +https://dl-cdn.alpinelinux.org/alpine/edge/community + diff --git a/utils/apk/patches/0001-remove-doc-generation.patch b/utils/apk/patches/0001-remove-doc-generation.patch new file mode 100644 index 000000000..21ba212c1 --- /dev/null +++ b/utils/apk/patches/0001-remove-doc-generation.patch @@ -0,0 +1,26 @@ +From b05a93c48fdbb50f0c464310dc2ce45777d32ea2 Mon Sep 17 00:00:00 2001 +From: Paul Spooren +Date: Fri, 2 Oct 2020 14:08:52 -1000 +Subject: [PATCH] remove doc generation + +Signed-off-by: Paul Spooren +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index a182269..6448917 100644 +--- a/Makefile ++++ b/Makefile +@@ -25,7 +25,7 @@ export DESTDIR SBINDIR LIBDIR CONFDIR MANDIR DOCDIR INCLUDEDIR PKGCONFIGDIR + ## + # Top-level subdirs + +-subdirs := libfetch/ src/ doc/ ++subdirs := libfetch/ src/ + + ## + # Include all rules and stuff +-- +2.25.1 + diff --git a/utils/apk/test.sh b/utils/apk/test.sh new file mode 100644 index 000000000..234cf5a79 --- /dev/null +++ b/utils/apk/test.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +case "$1" in + "apk") + apk --version | grep "${2#*v}" + ;; +esac