Browse Source

apk: add package

The Alpine Package Keeper is the default package manager for Alpine
Linux. They manage their own repositoriy with thousends of packages and
as musl is used for compilation, their binaries can directly run on
OpenWrt.

Signed-off-by: Paul Spooren <mail@aparcar.org>
lilik-openwrt-22.03
Paul Spooren 4 years ago
parent
commit
477081779f
7 changed files with 138 additions and 0 deletions
  1. +75
    -0
      utils/apk/Makefile
  2. +9
    -0
      utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
  3. +9
    -0
      utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub
  4. +9
    -0
      utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub
  5. +3
    -0
      utils/apk/files/alpine-repositories
  6. +26
    -0
      utils/apk/patches/0001-remove-doc-generation.patch
  7. +7
    -0
      utils/apk/test.sh

+ 75
- 0
utils/apk/Makefile View File

@ -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 <mail@aparcar.org>
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))

+ 9
- 0
utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub View File

@ -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-----

+ 9
- 0
utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub View File

@ -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-----

+ 9
- 0
utils/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub View File

@ -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-----

+ 3
- 0
utils/apk/files/alpine-repositories View File

@ -0,0 +1,3 @@
https://dl-cdn.alpinelinux.org/alpine/edge/main
https://dl-cdn.alpinelinux.org/alpine/edge/community

+ 26
- 0
utils/apk/patches/0001-remove-doc-generation.patch View File

@ -0,0 +1,26 @@
From b05a93c48fdbb50f0c464310dc2ce45777d32ea2 Mon Sep 17 00:00:00 2001
From: Paul Spooren <mail@aparcar.org>
Date: Fri, 2 Oct 2020 14:08:52 -1000
Subject: [PATCH] remove doc generation
Signed-off-by: Paul Spooren <mail@aparcar.org>
---
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

+ 7
- 0
utils/apk/test.sh View File

@ -0,0 +1,7 @@
#!/bin/sh
case "$1" in
"apk")
apk --version | grep "${2#*v}"
;;
esac

Loading…
Cancel
Save