You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.3 KiB

  1. #
  2. # Copyright (C) 2010 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=luci-app-bcp38
  9. PKG_VERSION:=2
  10. PKG_RELEASE:=2
  11. PKG_LICENSE:=Apache-2.0
  12. LUCI_DIR:=/usr/lib/lua/luci
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/luci-app-bcp38
  15. SECTION:=luci
  16. CATEGORY:=LuCI
  17. TITLE:=BCP38 LuCI interface
  18. MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
  19. PKGARCH:=all
  20. DEPENDS:= lua luci-base +bcp38
  21. SUBMENU:=3. Applications
  22. endef
  23. define Package/luci-app-bcp38/description
  24. Control BCP38 subnet blocking
  25. endef
  26. define Build/Compile
  27. endef
  28. define Build/Configure
  29. endef
  30. define Package/luci-app-bcp38/install
  31. $(INSTALL_DIR) $(1)$(LUCI_DIR)/controller $(1)$(LUCI_DIR)/model/cbi
  32. $(INSTALL_DATA) ./files/bcp38-controller.lua $(1)$(LUCI_DIR)/controller/bcp38.lua
  33. $(INSTALL_DATA) ./files/bcp38-cbi.lua $(1)$(LUCI_DIR)/model/cbi/bcp38.lua
  34. $(INSTALL_DIR) $(1)/etc/uci-defaults
  35. $(INSTALL_BIN) ./files/uci-defaults-bcp38 $(1)/etc/uci-defaults/luci-bcp38
  36. endef
  37. define Package/luci-app-bcp38/postinst
  38. #!/bin/sh
  39. [ -x /etc/uci-defaults/luci-bcp38 ] && /etc/uci-defaults/luci-bcp38 || exit 0
  40. endef
  41. define Package/luci-app-bcp38/postrm
  42. #!/bin/sh
  43. uci delete ucitrack.@bcp38[0]
  44. uci commit
  45. endef
  46. $(eval $(call BuildPackage,luci-app-bcp38))