e7275edf609af81601c7d06feb949fc196c382b5
[openwrt/svn-archive/archive.git] / net / ipkungfu / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ipkungfu
11 PKG_VERSION:=0.6.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.linuxkungfu.org/ipkungfu
16 PKG_MD5SUM:=89f6bc0df356dd4ee650882c54ec9074
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/ipkungfu
21 SECTION:=net
22 CATEGORY:=Network
23 TITLE:=IPKungFu is an iptables-based Linux firewall
24 URL:=http://www.linuxkungfu.org/
25 SUBMENU:=firewall
26 DEPENDS:=+bash
27 endef
28
29 define Package/ipkungfu/description
30 IPKungFu is an iptables-based Linux firewall.
31 It aims to simplify the configuration of Internet
32 connection sharing, port forwarding, and packet filtering.
33 endef
34
35 define Package/ipkungfu/conffiles
36 /etc/ipkungfu/accept_hosts.conf
37 /etc/ipkungfu/custom.conf
38 /etc/ipkungfu/forward.conf
39 /etc/ipkungfu/log.conf
40 /etc/ipkungfu/pre.conf
41 /etc/ipkungfu/services.conf
42 /etc/ipkungfu/advanced.conf
43 /etc/ipkungfu/deny_hosts.conf
44 /etc/ipkungfu/ipkungfu.conf
45 /etc/ipkungfu/post.conf
46 /etc/ipkungfu/redirect.conf
47 /etc/ipkungfu/vhosts.conf
48 endef
49
50 define Package/ipkungfu/postrm
51 #!/bin/sh
52 rm -rf /etc/ipkungfu/cache
53 rmdir /etc/ipkungfu 2>/dev/null || true
54 endef
55
56 # uses GNU configure
57 CONFIGURE_VARS+= \
58 ac_cv_path_IPTABLES="/usr/sbin/iptables" \
59 ac_cv_path_MD5SUM="/usr/bin/md5sum" \
60 ac_cv_path_MODPROBE="/sbin/insmod" \
61 ac_cv_path_RMMOD="/sbin/rmmode" \
62 ac_cv_path_DEPMOD="/bin/true" \
63 ac_cv_path_LSMOD="/sbin/lsmod" \
64 ac_cv_path_CUT="/usr/bincut" \
65 ac_cv_path_TR="/usr/bintr" \
66 ac_cv_path_GREP="/bin/grep" \
67 ac_cv_path_SED="/bin/sed" \
68 ac_cv_path_AWK="/usr/bin/awk" \
69
70 define Build/Compile
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 DESTDIR="$(PKG_INSTALL_DIR)" \
73 all install
74 endef
75
76 define Package/ipkungfu/install
77 $(INSTALL_DIR) $(1)/usr/sbin
78 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dummy_server $(1)/usr/sbin/
79 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipkungfu $(1)/usr/sbin/
80 $(INSTALL_DIR) $(1)/etc/ipkungfu/
81 $(CP) $(PKG_BUILD_DIR)/files/conf/* $(1)/etc/ipkungfu/
82 endef
83
84 $(eval $(call BuildPackage,ipkungfu))