# Portugal Futurista Router Meta-Package
# Pulls in all PF-specific router packages
#
# This is the one package to install on every PF router:
#   opkg install pf-router
#
# It depends on all individual PF router packages.

include $(TOPDIR)/rules.mk

PKG_NAME:=pf-router
PKG_VERSION:=0.1.0
PKG_RELEASE:=1

PKG_MAINTAINER:=Portugal Futurista <infra@portugalfuturista.org>
PKG_LICENSE:=MIT

include $(INCLUDE_DIR)/package.mk

define Package/pf-router
  SECTION:=pf
  CATEGORY:=Portugal Futurista
  TITLE:=PF Router meta-package
  DEPENDS:=+pf-mesh +pf-crowdsec +pf-mqtt +pf-health +pf-ota
  PKGARCH:=all
endef

define Package/pf-router/description
  Meta-package that installs all Portugal Futurista router packages:
  - pf-mesh: WireGuard auto-join the PF network
  - pf-crowdsec: CrowdSec firewall bouncer synced to pf-edge
  - pf-mqtt: MQTT telemetry bridge to pf-iot-stack
  - pf-health: Router health monitoring and alerting
  - pf-ota: Over-the-air firmware updates from firmware.portugalfuturista.org
endef

define Build/Compile
endef

define Package/pf-router/install
	$(INSTALL_DIR) $(1)/etc/pf-router
	$(INSTALL_DATA) ./files/pf-router.conf $(1)/etc/pf-router/config
endef

$(eval $(call BuildPackage,pf-router))
