fix: Add customfeeds.conf for local SecuBox package feed

- Create /etc/opkg/customfeeds.conf with secubox feed pre-configured
- Install file via Makefile instead of postinst script
- Mark as conffile to preserve user modifications on upgrade
- Add .gitignore to exclude built .ipk files from git tracking
  (packages are embedded at build time by embed_local_feed)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-01-11 10:12:07 +01:00
parent c090308dbd
commit dc6fc6c0a2
4 changed files with 21 additions and 6 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-secubox-bonus
PKG_VERSION:=0.2.0
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_ARCH:=all
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
@ -14,6 +14,10 @@ LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
define Package/luci-app-secubox-bonus/conffiles
/etc/opkg/customfeeds.conf
endef
define Package/luci-app-secubox-bonus/install
# Documentation and static content
$(INSTALL_DIR) $(1)/www/luci-static/secubox
@ -25,6 +29,10 @@ define Package/luci-app-secubox-bonus/install
$(CP) ./root/www/secubox-feed/* $(1)/www/secubox-feed/; \
fi
# opkg custom feeds configuration
$(INSTALL_DIR) $(1)/etc/opkg
$(INSTALL_CONF) ./root/etc/opkg/customfeeds.conf $(1)/etc/opkg/customfeeds.conf
# RPCD backend for package management
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.secubox-store $(1)/usr/libexec/rpcd/
@ -45,10 +53,6 @@ endef
define Package/luci-app-secubox-bonus/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
# Add local feed to opkg if not already present
if ! grep -q "secubox-feed" /etc/opkg/customfeeds.conf 2>/dev/null; then
echo "src/gz secubox file:///www/secubox-feed" >> /etc/opkg/customfeeds.conf
fi
# Restart rpcd to load new backend
/etc/init.d/rpcd restart
rm -rf /tmp/luci-modulecache /tmp/luci-indexcache 2>/dev/null

View File

@ -0,0 +1,5 @@
# SecuBox Local Package Feed
# Pre-built packages available for offline installation
# Managed by luci-app-secubox-bonus
src/gz secubox file:///www/secubox-feed

View File

@ -0,0 +1,7 @@
# Built packages are populated during build
# Do not commit binary files to git
*.ipk
*.apk
Packages
Packages.gz
apps-local.json

View File

@ -1 +0,0 @@
# SecuBox Local Package Feed\n\nThis directory is populated during build with .ipk packages.\nDo not commit built packages to git.