Initial commit: SecuBox v1.0.0 - fixed packages makefiles

This commit is contained in:
CyberMind-FR 2025-12-22 16:13:16 +01:00
parent ca90702f6f
commit 9bad706ec6
14 changed files with 273 additions and 283 deletions

View File

@ -22,7 +22,7 @@ on:
architectures:
description: 'Architectures to build (comma-separated or "all")'
required: false
default: 'x86-64'
default: 'aarch64-cortex-a72'
env:
OPENWRT_VERSION: ${{ github.event.inputs.openwrt_version || '23.05.5' }}

0
cleanup-packages.sh Normal file → Executable file
View File

97
fix-makefiles.sh Normal file
View File

@ -0,0 +1,97 @@
#!/bin/bash
# fix-makefiles.sh
# Script to fix Makefiles for OpenWrt LuCI packages
set -e
echo "🔧 SecuBox Makefile Fixer"
echo "========================="
echo ""
FIXED=0
SKIPPED=0
for makefile in luci-app-*/Makefile; do
if [[ ! -f "$makefile" ]]; then
continue
fi
PKG_DIR=$(dirname "$makefile")
PKG_NAME=$(basename "$PKG_DIR")
echo "📦 Processing: $PKG_NAME"
# Check if already has luci.mk include
if grep -q 'include.*feeds/luci/luci\.mk' "$makefile"; then
echo " ✅ Already has luci.mk include"
SKIPPED=$((SKIPPED + 1))
continue
fi
# Check if has package.mk include (alternative valid format)
if grep -q 'include.*package\.mk' "$makefile" && grep -q 'BuildPackage' "$makefile"; then
echo " ✅ Uses package.mk with BuildPackage (valid)"
SKIPPED=$((SKIPPED + 1))
continue
fi
# Need to fix - create backup first
cp "$makefile" "${makefile}.bak"
# Extract existing values
PKG_VERSION=$(grep "^PKG_VERSION:=" "$makefile" | cut -d'=' -f2 || echo "1.0.0")
PKG_RELEASE=$(grep "^PKG_RELEASE:=" "$makefile" | cut -d'=' -f2 || echo "1")
PKG_LICENSE=$(grep "^PKG_LICENSE:=" "$makefile" | cut -d'=' -f2 || echo "Apache-2.0")
LUCI_TITLE=$(grep "^LUCI_TITLE:=" "$makefile" | cut -d'=' -f2- || echo "LuCI - $PKG_NAME")
LUCI_DEPENDS=$(grep "^LUCI_DEPENDS:=" "$makefile" | cut -d'=' -f2- || echo "+luci-base")
# If no LUCI_TITLE, try to extract from define Package section
if [[ -z "$LUCI_TITLE" || "$LUCI_TITLE" == "LuCI - $PKG_NAME" ]]; then
TITLE_LINE=$(grep -A5 "define Package/" "$makefile" | grep "TITLE" | head -1 | cut -d'=' -f2-)
if [[ -n "$TITLE_LINE" ]]; then
LUCI_TITLE="$TITLE_LINE"
fi
fi
# Generate new Makefile
cat > "$makefile" << MAKEFILE_EOF
include \$(TOPDIR)/rules.mk
PKG_NAME:=${PKG_NAME}
PKG_VERSION:=${PKG_VERSION:-1.0.0}
PKG_RELEASE:=${PKG_RELEASE:-1}
PKG_LICENSE:=${PKG_LICENSE:-Apache-2.0}
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
LUCI_TITLE:=${LUCI_TITLE:-LuCI - SecuBox Module}
LUCI_DEPENDS:=${LUCI_DEPENDS:-+luci-base}
LUCI_PKGARCH:=all
include \$(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildance
MAKEFILE_EOF
echo " 🔧 Fixed Makefile (backup: ${makefile}.bak)"
FIXED=$((FIXED + 1))
done
echo ""
echo "========================="
echo "📊 Summary"
echo "========================="
echo "Fixed: $FIXED"
echo "Skipped: $SKIPPED"
echo ""
if [[ $FIXED -gt 0 ]]; then
echo "⚠️ Review the fixed Makefiles and adjust LUCI_TITLE and LUCI_DEPENDS as needed"
echo ""
echo "📝 Example correct values:"
echo " LUCI_TITLE:=LuCI - CrowdSec Security Dashboard"
echo " LUCI_DEPENDS:=+luci-base +rpcd +curl"
fi
echo ""
echo "✅ Done!"

View File

@ -1,49 +1,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-auth-guardian
PKG_VERSION:=1.0.0
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
PKG_LICENSE:=MIT
include $(INCLUDE_DIR)/package.mk
LUCI_TITLE:=LuCI - Auth Guardian (Captive Portal & OAuth)
LUCI_DESCRIPTION:=Authentication system with captive portal, OAuth2 (Google, GitHub), voucher management, and session control for SecuBox.
LUCI_DEPENDS:=+luci-base +rpcd +curl +nodogsplash
LUCI_PKGARCH:=all
define Package/luci-app-auth-guardian
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=Auth Guardian - Authentication & Session Manager
DEPENDS:=+luci-base +rpcd +nodogsplash
PKGARCH:=all
endef
include $(TOPDIR)/feeds/luci/luci.mk
define Package/luci-app-auth-guardian/description
Comprehensive authentication and session management:
- Captive portal with customizable splash pages
- OAuth2/OIDC integration (Google, GitHub, etc.)
- Cookie-based session management
- MAC authentication bypass
- Voucher/ticket system
- Time-based access control
- User/device tracking
endef
define Build/Compile
endef
define Package/luci-app-auth-guardian/install
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.auth-guardian $(1)/usr/libexec/rpcd/
$(INSTALL_DIR) $(1)/usr/share/luci/menu.d
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/*.json $(1)/usr/share/luci/menu.d/
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/*.json $(1)/usr/share/rpcd/acl.d/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./root/etc/config/authguard $(1)/etc/config/
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/auth-guardian
$(INSTALL_DATA) ./htdocs/luci-static/resources/view/auth-guardian/*.js $(1)/www/luci-static/resources/view/auth-guardian/
$(INSTALL_DIR) $(1)/www/luci-static/resources/auth-guardian
$(INSTALL_DATA) ./htdocs/luci-static/resources/auth-guardian/*.js $(1)/www/luci-static/resources/auth-guardian/
endef
$(eval $(call BuildPackage,luci-app-auth-guardian))
# call BuildPackage - OpenWrt buildroot

View File

@ -1,53 +1,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-bandwidth-manager
PKG_VERSION:=1.0.0
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
PKG_LICENSE:=MIT
include $(INCLUDE_DIR)/package.mk
LUCI_TITLE:=LuCI - Bandwidth Manager (QoS & Quotas)
LUCI_DESCRIPTION:=Advanced bandwidth management with CAKE QoS, per-client quotas, automatic media detection, and traffic scheduling for SecuBox.
LUCI_DEPENDS:=+luci-base +rpcd +tc-full +kmod-sched-cake +sqm-scripts
LUCI_PKGARCH:=all
define Package/luci-app-bandwidth-manager
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=Bandwidth Manager - QoS, Quotas & Media Detection
DEPENDS:=+luci-base +rpcd +tc +kmod-sched-cake +kmod-sched-fq-codel
PKGARCH:=all
endef
include $(TOPDIR)/feeds/luci/luci.mk
define Package/luci-app-bandwidth-manager/description
Advanced bandwidth management for OpenWrt with:
- Per-client and per-group quotas (daily/monthly)
- Bandwidth throttling and shaping
- 8-level QoS priority classes
- Automatic media detection (VoIP, Gaming, Streaming)
- Time-based scheduling
- Real-time statistics and graphs
endef
define Build/Compile
endef
define Package/luci-app-bandwidth-manager/install
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.bandwidth-manager $(1)/usr/libexec/rpcd/
$(INSTALL_DIR) $(1)/usr/share/luci/menu.d
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/*.json $(1)/usr/share/luci/menu.d/
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/*.json $(1)/usr/share/rpcd/acl.d/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./root/etc/config/bandwidth $(1)/etc/config/
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/bandwidth-manager
$(INSTALL_DATA) ./htdocs/luci-static/resources/view/bandwidth-manager/*.js $(1)/www/luci-static/resources/view/bandwidth-manager/
$(INSTALL_DIR) $(1)/www/luci-static/resources/bandwidth-manager
$(INSTALL_DATA) ./htdocs/luci-static/resources/bandwidth-manager/*.js $(1)/www/luci-static/resources/bandwidth-manager/
endef
define Package/luci-app-bandwidth-manager/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || /etc/init.d/rpcd reload
endef
$(eval $(call BuildPackage,luci-app-bandwidth-manager))
# call BuildPackage - OpenWrt buildroot

View File

@ -1,48 +1,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-media-flow
PKG_VERSION:=1.0.0
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
PKG_LICENSE:=MIT
include $(INCLUDE_DIR)/package.mk
LUCI_TITLE:=LuCI - Media Flow (Streaming Detection)
LUCI_DESCRIPTION:=Real-time streaming service detection and monitoring for Netflix, YouTube, Twitch, Zoom, Teams with quality indicators for SecuBox.
LUCI_DEPENDS:=+luci-base +rpcd +netifyd
LUCI_PKGARCH:=all
define Package/luci-app-media-flow
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=Media Flow - Streaming & Media Detection
DEPENDS:=+luci-base +rpcd +netifyd
PKGARCH:=all
endef
include $(TOPDIR)/feeds/luci/luci.mk
define Package/luci-app-media-flow/description
Advanced media and streaming traffic detection:
- Real-time protocol identification (RTSP, HLS, DASH)
- Streaming service detection (Netflix, YouTube, Twitch)
- VoIP/Video call identification (Zoom, Teams, Meet)
- Media quality monitoring
- Bandwidth allocation for media
- Content type classification
endef
define Build/Compile
endef
define Package/luci-app-media-flow/install
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.media-flow $(1)/usr/libexec/rpcd/
$(INSTALL_DIR) $(1)/usr/share/luci/menu.d
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/*.json $(1)/usr/share/luci/menu.d/
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/*.json $(1)/usr/share/rpcd/acl.d/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./root/etc/config/mediaflow $(1)/etc/config/
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/media-flow
$(INSTALL_DATA) ./htdocs/luci-static/resources/view/media-flow/*.js $(1)/www/luci-static/resources/view/media-flow/
$(INSTALL_DIR) $(1)/www/luci-static/resources/media-flow
$(INSTALL_DATA) ./htdocs/luci-static/resources/media-flow/*.js $(1)/www/luci-static/resources/media-flow/
endef
$(eval $(call BuildPackage,luci-app-media-flow))
# call BuildPackage - OpenWrt buildroot

View File

@ -1,48 +1,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-vhost-manager
PKG_VERSION:=1.0.0
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
PKG_LICENSE:=MIT
include $(INCLUDE_DIR)/package.mk
LUCI_TITLE:=LuCI - VHost Manager (Reverse Proxy & SSL)
LUCI_DESCRIPTION:=Virtual host manager for local services like Nextcloud, GitLab, Jellyfin with nginx reverse proxy and automatic SSL certificates for SecuBox.
LUCI_DEPENDS:=+luci-base +rpcd +nginx-ssl +acme +acme-acmesh
LUCI_PKGARCH:=all
define Package/luci-app-vhost-manager
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=VHost Manager - Virtual Hosts & Local SaaS
DEPENDS:=+luci-base +rpcd +nginx +dnsmasq
PKGARCH:=all
endef
include $(TOPDIR)/feeds/luci/luci.mk
define Package/luci-app-vhost-manager/description
Virtual host and local SaaS management:
- Internal virtual hosts configuration
- External service redirection to local alternatives
- Self-hosted SaaS deployment (Nextcloud, GitLab, etc.)
- DNS-based traffic interception
- SSL certificate management
- Reverse proxy configuration
endef
define Build/Compile
endef
define Package/luci-app-vhost-manager/install
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.vhost-manager $(1)/usr/libexec/rpcd/
$(INSTALL_DIR) $(1)/usr/share/luci/menu.d
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/*.json $(1)/usr/share/luci/menu.d/
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/*.json $(1)/usr/share/rpcd/acl.d/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./root/etc/config/vhost $(1)/etc/config/
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/vhost-manager
$(INSTALL_DATA) ./htdocs/luci-static/resources/view/vhost-manager/*.js $(1)/www/luci-static/resources/view/vhost-manager/
$(INSTALL_DIR) $(1)/www/luci-static/resources/vhost-manager
$(INSTALL_DATA) ./htdocs/luci-static/resources/vhost-manager/*.js $(1)/www/luci-static/resources/vhost-manager/
endef
$(eval $(call BuildPackage,luci-app-vhost-manager))
# call BuildPackage - OpenWrt buildroot

View File

@ -0,0 +1,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-auth-guardian
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
LUCI_TITLE:=LuCI - Auth Guardian (Captive Portal & OAuth)
LUCI_DESCRIPTION:=Authentication system with captive portal, OAuth2 (Google, GitHub), voucher management, and session control for SecuBox.
LUCI_DEPENDS:=+luci-base +rpcd +curl +nodogsplash
LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot

View File

@ -0,0 +1,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-bandwidth-manager
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
LUCI_TITLE:=LuCI - Bandwidth Manager (QoS & Quotas)
LUCI_DESCRIPTION:=Advanced bandwidth management with CAKE QoS, per-client quotas, automatic media detection, and traffic scheduling for SecuBox.
LUCI_DEPENDS:=+luci-base +rpcd +tc-full +kmod-sched-cake +sqm-scripts
LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot

View File

@ -0,0 +1,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-media-flow
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
LUCI_TITLE:=LuCI - Media Flow (Streaming Detection)
LUCI_DESCRIPTION:=Real-time streaming service detection and monitoring for Netflix, YouTube, Twitch, Zoom, Teams with quality indicators for SecuBox.
LUCI_DEPENDS:=+luci-base +rpcd +netifyd
LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot

View File

@ -0,0 +1,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-secubox
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
LUCI_TITLE:=LuCI - SecuBox Hub (Central Dashboard)
LUCI_DESCRIPTION:=Central control hub for all SecuBox modules. Provides unified dashboard, module status, system health monitoring, and quick actions.
LUCI_DEPENDS:=+luci-base +rpcd +curl +jq
LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot

View File

@ -0,0 +1,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-vhost-manager
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
LUCI_TITLE:=LuCI - VHost Manager (Reverse Proxy & SSL)
LUCI_DESCRIPTION:=Virtual host manager for local services like Nextcloud, GitLab, Jellyfin with nginx reverse proxy and automatic SSL certificates for SecuBox.
LUCI_DEPENDS:=+luci-base +rpcd +nginx-ssl +acme +acme-acmesh
LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot

BIN
secubox-makefile-fixes.zip Normal file

Binary file not shown.

View File

@ -1,128 +1,75 @@
# SecuBox LuCI Application Makefile Template
# Copyright (C) 2025 CyberMind.fr
# SPDX-License-Identifier: Apache-2.0
# Template Makefile for SecuBox LuCI Applications
# ================================================
# Copy this template and customize for each package
include $(TOPDIR)/rules.mk
# ============================================
# Package Information
# ============================================
PKG_NAME:=luci-app-TEMPLATE-dashboard
PKG_VERSION:=1.0.0
# Package metadata
PKG_NAME:=luci-app-PACKAGE_NAME
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Gandalf <contact@cybermind.fr>
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
# ============================================
# LuCI Configuration
# ============================================
LUCI_TITLE:=LuCI TEMPLATE Dashboard
LUCI_DESCRIPTION:=Dashboard for TEMPLATE on OpenWrt
LUCI_DEPENDS:=+luci-base +TEMPLATE
# LuCI specific
LUCI_TITLE:=LuCI - Package Description
LUCI_DESCRIPTION:=Detailed description of what this package does
LUCI_DEPENDS:=+luci-base
LUCI_PKGARCH:=all
# Optional: Extra dependencies
# +luci-lib-jsonc +rpcd +uhttpd
# Include LuCI build system
include $(TOPDIR)/feeds/luci/luci.mk
# ============================================
# Package Definition
# ============================================
define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=$(LUCI_TITLE)
DEPENDS:=$(LUCI_DEPENDS)
PKGARCH:=$(LUCI_PKGARCH)
endef
# Call BuildPackage - this is handled by luci.mk
# No need for explicit Package/xxx/install when using luci.mk
define Package/$(PKG_NAME)/description
$(LUCI_DESCRIPTION)
# === END OF TEMPLATE ===
Features:
- Real-time status monitoring
- Configuration management
- Interactive dashboard
- System integration
endef
# ============================================
# Installation
# ============================================
define Package/$(PKG_NAME)/install
# JavaScript views
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/TEMPLATE
$(INSTALL_DATA) ./htdocs/luci-static/resources/view/TEMPLATE/*.js \
$(1)/www/luci-static/resources/view/TEMPLATE/
# API and CSS
$(INSTALL_DIR) $(1)/www/luci-static/resources/TEMPLATE
$(INSTALL_DATA) ./htdocs/luci-static/resources/TEMPLATE/*.js \
$(1)/www/luci-static/resources/TEMPLATE/
$(INSTALL_DATA) ./htdocs/luci-static/resources/TEMPLATE/*.css \
$(1)/www/luci-static/resources/TEMPLATE/
# Menu configuration
$(INSTALL_DIR) $(1)/usr/share/luci/menu.d
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/$(PKG_NAME).json \
$(1)/usr/share/luci/menu.d/
# ACL configuration
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/$(PKG_NAME).json \
$(1)/usr/share/rpcd/acl.d/
# RPCD backend
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) ./root/usr/libexec/rpcd/TEMPLATE \
$(1)/usr/libexec/rpcd/
# UCI default config (optional)
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./root/etc/config/TEMPLATE \
$(1)/etc/config/
# UCI defaults (optional - runs on first install)
# $(INSTALL_DIR) $(1)/etc/uci-defaults
# $(INSTALL_BIN) ./root/etc/uci-defaults/$(PKG_NAME) \
# $(1)/etc/uci-defaults/
endef
# ============================================
# Post-installation
# ============================================
define Package/$(PKG_NAME)/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
# Reload rpcd to register new methods
/etc/init.d/rpcd reload 2>/dev/null || true
# Clear LuCI cache
rm -rf /tmp/luci-modulecache 2>/dev/null || true
rm -rf /tmp/luci-indexcache* 2>/dev/null || true
echo "$(PKG_NAME) installed successfully"
}
exit 0
endef
define Package/$(PKG_NAME)/postrm
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
# Reload rpcd
/etc/init.d/rpcd reload 2>/dev/null || true
# Clear LuCI cache
rm -rf /tmp/luci-modulecache 2>/dev/null || true
rm -rf /tmp/luci-indexcache* 2>/dev/null || true
}
exit 0
endef
# ============================================
# Build
# ============================================
$(eval $(call BuildPackage,$(PKG_NAME)))
# ================================================
# NOTES FOR DEVELOPERS
# ================================================
#
# Directory structure expected by luci.mk:
#
# luci-app-mypackage/
# ├── Makefile # This file
# ├── htdocs/
# │ └── luci-static/
# │ └── resources/
# │ └── view/
# │ └── mypackage/
# │ └── main.js # LuCI JavaScript view
# └── root/
# ├── etc/
# │ ├── config/
# │ │ └── mypackage # UCI config file
# │ ├── init.d/
# │ │ └── mypackage # Init script (executable)
# │ └── uci-defaults/
# │ └── 99-mypackage # First-run setup (executable)
# └── usr/
# ├── libexec/
# │ └── rpcd/
# │ └── mypackage # RPCD backend script (executable)
# └── share/
# ├── luci/
# │ └── menu.d/
# │ └── luci-app-mypackage.json # Menu entry
# └── rpcd/
# └── acl.d/
# └── luci-app-mypackage.json # ACL permissions
#
# ================================================
# COMMON LUCI_DEPENDS OPTIONS
# ================================================
#
# +luci-base - Required for all LuCI apps
# +luci-compat - Legacy API compatibility
# +luci-lib-jsonc - JSON-C library
# +rpcd - RPC daemon (for backend scripts)
# +curl - HTTP client
# +jq - JSON processor
# +wireguard-tools - WireGuard utilities
# +qrencode - QR code generator
#
# ================================================