summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/freifunk-firewall/Makefile
blob: 5bcb2c8ad5146b79674e906cc8c9d29a0c3eef4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
# Copyright (C) 2009 Jo-Philipp Wich <xm@subsignal.org>
#
# This is free software, licensed under the Apache 2.0 license.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=freifunk-firewall
PKG_RELEASE:=3

PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/freifunk-firewall
  SECTION:=luci
  CATEGORY:=LuCI
  SUBMENU:=9. Freifunk
  TITLE:=Freifunk Firewall Addon
  DEPENDS:=+firewall
endef

define Package/freifunk-firewall/description
  Various firewall extensions for Freifunk. Includes NAT fixes and advanced settings.
endef

define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
endef

define Build/Configure
endef

define Build/Compile
endef

define Package/freifunk-firewall/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
  if ! grep -q /etc/firewall.freifunk /etc/config/firewall; then
    uci add firewall include >/dev/null
    uci set firewall.@include[-1].path=/etc/firewall.freifunk
    uci commit firewall
  fi
}
endef

define Package/freifunk-firewall/install
	$(CP) ./files/* $(1)/
endef

$(eval $(call BuildPackage,freifunk-firewall))