d777e13458d3798c9ed74c6f6551524ad39761b8
[feed/routing.git] / bcp38 / Makefile
1 #
2 # Copyright (C) 2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 # Please note this is not an officially released version of bcp38
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=bcp38
11 PKG_VERSION:=4
12 PKG_RELEASE:=1
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define Package/bcp38
17 SECTION:=net
18 CATEGORY:=Network
19 SUBMENU:=Routing and Redirection
20 TITLE:=BCP38 compliance
21 URL:=http://www.github.com/dtaht/bcp38
22 MAINTAINER:=Dave Taht <d+bcp38@taht.net>
23 DEPENDS:=+ipset
24 endef
25
26 define Package/bcp38/description
27 bcp38 implements rfc bcp 38 for home routers.
28 endef
29
30 define Package/bcp38/conffiles
31 /etc/config/bcp38
32 endef
33
34 define Build/Prepare
35 endef
36
37 define Build/Configure
38 endef
39
40 define Build/Compile
41 endef
42
43 define Package/bcp38/install
44 $(INSTALL_DIR) $(1)/etc/config
45 $(INSTALL_CONF) ./files/bcp38.config $(1)/etc/config/bcp38
46 $(INSTALL_DIR) $(1)/usr/lib/bcp38
47 $(INSTALL_BIN) ./files/run.sh $(1)/usr/lib/bcp38/run.sh
48 $(INSTALL_DIR) $(1)/etc/uci-defaults
49 $(INSTALL_BIN) ./files/bcp38.defaults $(1)/etc/uci-defaults/bcp38
50 endef
51
52 define Package/bcp38/postinst
53 #!/bin/sh
54 [ -x /etc/uci-defaults/bcp38 ] && /etc/uci-defaults/bcp38 || exit 0
55 endef
56
57 define Package/bcp38/postrm
58 #!/bin/sh
59 uci delete firewall.bcp38
60 uci commit
61 endef
62
63 $(eval $(call BuildPackage,bcp38))