diff --git a/package/secubox/secubox-core/Makefile b/package/secubox/secubox-core/Makefile index 6ecd633d..80aa4e33 100644 --- a/package/secubox/secubox-core/Makefile +++ b/package/secubox/secubox-core/Makefile @@ -67,9 +67,13 @@ define Package/secubox-core/install $(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.secubox $(1)/usr/libexec/rpcd/ $(INSTALL_DIR) $(1)/usr/share/secubox/modules + $(INSTALL_DIR) $(1)/usr/share/secubox/plugins/catalog $(INSTALL_DIR) $(1)/usr/share/secubox/scripts $(INSTALL_DATA) ./root/usr/share/secubox/scripts/* $(1)/usr/share/secubox/scripts/ + # Install module catalog files if they exist + -$(INSTALL_DATA) ./root/usr/share/secubox/plugins/catalog/*.json $(1)/usr/share/secubox/plugins/catalog/ 2>/dev/null || true + $(INSTALL_DIR) $(1)/var/run/secubox $(INSTALL_DIR) $(1)/var/log/secubox endef diff --git a/package/secubox/secubox-core/root/usr/share/secubox/plugins/catalog/README.md b/package/secubox/secubox-core/root/usr/share/secubox/plugins/catalog/README.md new file mode 100644 index 00000000..f2514136 --- /dev/null +++ b/package/secubox/secubox-core/root/usr/share/secubox/plugins/catalog/README.md @@ -0,0 +1,57 @@ +# SecuBox Module Catalog + +This directory contains module catalog entries for the SecuBox AppStore. + +## Structure + +Each module has its own JSON file: +- `.json` - Module manifest and metadata + +## Module Catalog Format + +```json +{ + "id": "module-name", + "name": "Display Name", + "version": "1.0.0", + "category": "networking", + "runtime": "native", + "packages": { + "required": ["package-name"], + "recommended": ["optional-package"] + }, + "capabilities": ["capability-1", "capability-2"], + "requirements": { + "min_ram_mb": 64, + "min_storage_mb": 10 + } +} +``` + +## Categories + +- `networking` - Network services and utilities +- `security` - Security and threat detection +- `monitoring` - System and network monitoring +- `iot` - IoT and home automation +- `media` - Media streaming and entertainment +- `system` - System utilities and management + +## Adding New Modules + +1. Create a new JSON file: `.json` +2. Define the manifest with required fields: + - `id`, `name`, `version` + - `category`, `runtime` + - `packages`, `capabilities` + +3. Test installation: + ```bash + secubox app install + ``` + +## Notes + +- Module catalog files are used by `secubox-appstore` for module discovery +- The `luci-app-secubox/appstore/apps.json` file contains the master catalog +- Individual module files here provide detailed metadata for advanced features diff --git a/package/secubox/secubox-core/root/usr/share/secubox/plugins/catalog/example-module.json.sample b/package/secubox/secubox-core/root/usr/share/secubox/plugins/catalog/example-module.json.sample new file mode 100644 index 00000000..c1d0b286 --- /dev/null +++ b/package/secubox/secubox-core/root/usr/share/secubox/plugins/catalog/example-module.json.sample @@ -0,0 +1,41 @@ +{ + "id": "example-module", + "name": "Example Module", + "version": "1.0.0", + "category": "system", + "runtime": "native", + "description": "Example module catalog entry demonstrating the structure", + "author": "SecuBox Team", + "license": "GPL-2.0", + "url": "https://github.com/your-org/example-module", + "icon": "⚙️", + "tags": ["example", "demo"], + "packages": { + "required": [ + "luci-app-example-module" + ], + "recommended": [ + "example-module-extras" + ] + }, + "capabilities": [ + "system-management", + "monitoring" + ], + "requirements": { + "min_ram_mb": 64, + "min_storage_mb": 10, + "openwrt_version": "24.10" + }, + "hooks": { + "pre_install": "/usr/share/example-module/hooks/pre-install.sh", + "post_install": "/usr/share/example-module/hooks/post-install.sh", + "pre_remove": "/usr/share/example-module/hooks/pre-remove.sh", + "post_remove": "/usr/share/example-module/hooks/post-remove.sh" + }, + "config": { + "uci_package": "example-module", + "init_script": "/etc/init.d/example-module", + "default_enabled": true + } +}