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