secubox-openwrt/package/secubox/luci-app-secubox-bonus/Makefile
CyberMind-FR c090308dbd feat: Add local package store to luci-app-secubox-bonus
- Add embed_local_feed() to local-build.sh that copies built packages
  into bonus app as /www/secubox-feed/ for offline installation
- Generate Packages index and apps-local.json manifest for opkg
- Add RPCD backend (luci.secubox-store) for package install/remove
- Add LuCI view for browsing and managing local packages
- Fix OPENWRT_ONLY_PACKAGES to allow secubox-app-* wrappers in SDK build
- Remove experimental python3-* packages (unfinished mitmproxy native plan)
- Set rootfs partition size to 16GB for larger overlay
- Bump luci-app-secubox-bonus to v0.2.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 09:15:19 +01:00

61 lines
2.2 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-secubox-bonus
PKG_VERSION:=0.2.0
PKG_RELEASE:=1
PKG_ARCH:=all
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
LUCI_TITLE:=LuCI - SecuBox Bonus Content & Local Package Store
LUCI_DESCRIPTION:=SecuBox documentation, local package repository, and app store. Includes all SecuBox packages as a local opkg feed for offline installation. Accessible at /luci-static/secubox/
LUCI_DEPENDS:=+luci-base +rpcd +luci-lib-jsonc
LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
define Package/luci-app-secubox-bonus/install
# Documentation and static content
$(INSTALL_DIR) $(1)/www/luci-static/secubox
$(CP) ./htdocs/luci-static/secubox/* $(1)/www/luci-static/secubox/
# Local package feed (populated by build)
$(INSTALL_DIR) $(1)/www/secubox-feed
if [ -d ./root/www/secubox-feed ] && [ -n "$$$$(ls -A ./root/www/secubox-feed 2>/dev/null)" ]; then \
$(CP) ./root/www/secubox-feed/* $(1)/www/secubox-feed/; \
fi
# RPCD backend for package management
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.secubox-store $(1)/usr/libexec/rpcd/
# ACL permissions
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/luci-app-secubox-bonus.json $(1)/usr/share/rpcd/acl.d/
# LuCI menu entry
$(INSTALL_DIR) $(1)/usr/share/luci/menu.d
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/luci-app-secubox-bonus.json $(1)/usr/share/luci/menu.d/
# JavaScript view
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/secubox-bonus
$(INSTALL_DATA) ./htdocs/luci-static/resources/view/secubox-bonus/*.js $(1)/www/luci-static/resources/view/secubox-bonus/
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
echo "SecuBox Bonus & Package Store installed."
}
exit 0
endef
# call BuildPackage - OpenWrt buildroot