The OpenWrt SDK automatically adds libc as a dependency to all packages, even pure shell/JavaScript packages that don't need it. This causes opkg installation failures when the local feed version of libc doesn't match the router's installed version. Solution: Add PKG_FLAGS:=nonshared to Makefiles of arch-independent packages (secubox-core, luci-app-secubox-admin, secubox-app-bonus). This tells the build system these packages don't link against libc. Changes: - secubox-core: 0.10.0-r6 → r7 with PKG_FLAGS:=nonshared - luci-app-secubox-admin: 1.0.0-r17 → r18 with PKG_FLAGS:=nonshared - secubox-app-bonus: 0.3.0-r1 → r2 with PKG_FLAGS:=nonshared - Regenerated Packages index without libc dependencies Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
84 lines
2.8 KiB
Makefile
84 lines
2.8 KiB
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=secubox-app-bonus
|
|
PKG_VERSION:=0.3.0
|
|
PKG_RELEASE:=2
|
|
PKG_LICENSE:=Apache-2.0
|
|
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
|
|
PKG_ARCH:=all
|
|
# Prevent automatic libc dependency - this is a pure data/script package
|
|
PKG_FLAGS:=nonshared
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/secubox-app-bonus
|
|
SECTION:=secubox
|
|
CATEGORY:=SecuBox
|
|
TITLE:=SecuBox Local Package Feed & Documentation
|
|
PKGARCH:=all
|
|
# Explicitly no dependencies - pure shell scripts and static files
|
|
DEPENDS:=
|
|
endef
|
|
|
|
define Package/secubox-app-bonus/description
|
|
SecuBox local package repository for offline installation.
|
|
Provides pre-built SecuBox packages via opkg local feed at /www/secubox-feed/.
|
|
Also includes SecuBox documentation at /www/luci-static/secubox/.
|
|
endef
|
|
|
|
define Package/secubox-app-bonus/conffiles
|
|
/etc/opkg/customfeeds.conf
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
define Package/secubox-app-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
|
|
# Remove any Packages.sig to avoid opkg signature verification issues
|
|
$(RM) $(1)/www/secubox-feed/Packages.sig 2>/dev/null || true
|
|
|
|
# opkg custom feeds configuration
|
|
$(INSTALL_DIR) $(1)/etc/opkg
|
|
$(INSTALL_CONF) ./root/etc/opkg/customfeeds.conf $(1)/etc/opkg/customfeeds.conf
|
|
|
|
# Init script to sync package list on boot
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_BIN) ./root/etc/init.d/secubox-feed $(1)/etc/init.d/secubox-feed
|
|
|
|
# Feed management CLI tools
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) ./root/usr/sbin/secubox-feed $(1)/usr/sbin/secubox-feed
|
|
$(INSTALL_BIN) ./root/usr/sbin/secubox-feed-health $(1)/usr/sbin/secubox-feed-health
|
|
|
|
# RPCD interface for ubus/LuCI integration
|
|
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
|
|
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.secubox-feed $(1)/usr/libexec/rpcd/luci.secubox-feed
|
|
|
|
# HAProxy configuration snippet (optional)
|
|
$(INSTALL_DIR) $(1)/etc/haproxy/conf.d
|
|
$(INSTALL_DATA) ./root/etc/haproxy/conf.d/secubox-feed.cfg $(1)/etc/haproxy/conf.d/secubox-feed.cfg
|
|
endef
|
|
|
|
define Package/secubox-app-bonus/postinst
|
|
#!/bin/sh
|
|
[ -n "$${IPKG_INSTROOT}" ] || {
|
|
# Enable and start the feed sync service
|
|
/etc/init.d/secubox-feed enable 2>/dev/null || true
|
|
/etc/init.d/secubox-feed start 2>/dev/null || true
|
|
echo "SecuBox local package feed installed at /www/secubox-feed/"
|
|
[ -f /var/opkg-lists/secubox ] && echo "Package list: $$(grep -c '^Package:' /var/opkg-lists/secubox) packages available"
|
|
}
|
|
exit 0
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,secubox-app-bonus))
|