secubox-openwrt/package/secubox/luci-app-torrent/Makefile
CyberMind-FR 10b3d3a43c feat(torrent): Add LuCI dashboard and fix WebTorrent ESM issue
- Add luci-app-torrent: unified dashboard for qBittorrent + WebTorrent
  - RPCD handler with status/list/start/stop/add methods
  - Dark-themed UI with real-time torrent queue display
  - Start/Stop controls and magnet link add functionality
  - 5-second auto-refresh polling
- Fix webtorrent v2.x ESM incompatibility
  - Pin to v1.9.7 (last CommonJS version)
  - Use npm install with --save-exact to prevent semver drift
- HAProxy exposure configured:
  - qBittorrent: torrent.gk2.secubox.in (192.168.255.42:8090)
  - WebTorrent: stream.gk2.secubox.in (192.168.255.43:8095)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-15 06:59:07 +01:00

26 lines
983 B
Makefile

include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Torrent Dashboard
LUCI_DESCRIPTION:=Unified dashboard for qBittorrent and WebTorrent
LUCI_DEPENDS:=+luci-base +secubox-app-qbittorrent +secubox-app-webtorrent
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-torrent
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
include $(TOPDIR)/feeds/luci/luci.mk
define Package/luci-app-torrent/install
$(INSTALL_DIR) $(1)/usr/share/luci/menu.d
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/luci-app-torrent.json $(1)/usr/share/luci/menu.d/
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/luci-app-torrent.json $(1)/usr/share/rpcd/acl.d/
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.torrent $(1)/usr/libexec/rpcd/
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/torrent
$(INSTALL_DATA) ./htdocs/luci-static/resources/view/torrent/overview.js $(1)/www/luci-static/resources/view/torrent/
endef
$(eval $(call BuildPackage,luci-app-torrent))