Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # Copyright (C) 2009 Jo-Philipp Wich <jow@openwrt.org>
  3. #
  4. # This is free software, licensed under the Apache 2.0 license.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=freifunk-firewall
  8. PKG_RELEASE:=3
  9. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  10. include $(INCLUDE_DIR)/package.mk
  11. define Package/freifunk-firewall
  12. SECTION:=luci
  13. CATEGORY:=LuCI
  14. SUBMENU:=9. Freifunk
  15. TITLE:=Freifunk Firewall Addon
  16. DEPENDS:=+firewall
  17. endef
  18. define Package/freifunk-firewall/description
  19. Various firewall extensions for Freifunk. Includes NAT fixes and advanced settings.
  20. endef
  21. define Build/Prepare
  22. mkdir -p $(PKG_BUILD_DIR)
  23. endef
  24. define Build/Configure
  25. endef
  26. define Build/Compile
  27. endef
  28. define Package/freifunk-firewall/postinst
  29. #!/bin/sh
  30. [ -n "$${IPKG_INSTROOT}" ] || {
  31. if ! grep -q /etc/firewall.freifunk /etc/config/firewall; then
  32. uci add firewall include >/dev/null
  33. uci set firewall.@include[-1].path=/etc/firewall.freifunk
  34. uci commit firewall
  35. fi
  36. }
  37. endef
  38. define Package/freifunk-firewall/install
  39. $(CP) ./files/* $(1)/
  40. endef
  41. $(eval $(call BuildPackage,freifunk-firewall))