[openwrt/openwrt] apk: add a customfeeds.list configuration file

LEDE Commits lede-commits at lists.infradead.org
Sat Nov 16 08:26:37 PST 2024


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a6e98a810d4d831caf9f18536701c433b9e57fc8

commit a6e98a810d4d831caf9f18536701c433b9e57fc8
Author: Jonas Gorski <jonas.gorski at gmail.com>
AuthorDate: Wed Nov 13 14:27:16 2024 +0100

    apk: add a customfeeds.list configuration file
    
    Analog to how we handle custom feeds in opkg, add a customfeeds.list for
    custom package feeds and mark it as a configuration file.
    
    Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/16940
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/system/apk/Makefile               | 12 +++++++++++-
 package/system/apk/files/customfeeds.list |  3 +++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/package/system/apk/Makefile b/package/system/apk/Makefile
index 4dbd0f854f..fbb9ef85ee 100644
--- a/package/system/apk/Makefile
+++ b/package/system/apk/Makefile
@@ -14,7 +14,7 @@ PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
 PKG_MAINTAINER:=Paul Spooren <mail at aparcar.org>
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=LICENSE
-PKG_INSTALL:=1
+PKG_INSTALL:=2
 
 HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
 HOST_BUILD_DEPENDS:=lua/host
@@ -68,6 +68,13 @@ MESON_ARGS += \
 	$(MESON_COMMON_ARGS) \
 	-Dcrypto_backend=$(BUILD_VARIANT)
 
+define Package/apk/conffiles
+/etc/apk/repositories.d/customfeeds.list
+endef
+
+Package/apk-mbedtls/conffiles = $(Package/apk/conffiles)
+Package/apk-openssl/conffiles = $(Package/apk/conffiles)
+
 define Package/apk/default/install
 	$(INSTALL_DIR) $(1)/lib/apk/db
 
@@ -76,6 +83,9 @@ define Package/apk/default/install
 
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libapk.so.* $(1)/usr/lib/
+
+	$(INSTALL_DIR) $(1)/etc/apk/repositories.d
+	$(INSTALL_DATA) ./files/customfeeds.list $(1)/etc/apk/repositories.d/customfeeds.list
 endef
 
 Package/apk-mbedtls/install = $(Package/apk/default/install)
diff --git a/package/system/apk/files/customfeeds.list b/package/system/apk/files/customfeeds.list
new file mode 100644
index 0000000000..c75016bfc8
--- /dev/null
+++ b/package/system/apk/files/customfeeds.list
@@ -0,0 +1,3 @@
+# add your custom package feeds here
+#
+# http://www.example.com/path/to/files/packages.adb




More information about the lede-commits mailing list