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