[packages] net/ipkungfu: Cleanup
- use openwrt locations for utilities, fixes compilation on systems missing those utilites, allows ipkungfu to run - $(INSTALL_BIN) to properly install binaries - rewrite to use insmod in place of modprobe - depends on bash - delete autogenerated md5sum manifsts during removal, fixes reinstallation/upgrades - needs more work, but this is a start and prevents error during compilation git-svn-id: svn://svn.openwrt.org/openwrt/packages@12083 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a951e28cf7
commit
7f9077012c
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=ipkungfu
|
PKG_NAME:=ipkungfu
|
||||||
PKG_VERSION:=0.6.1
|
PKG_VERSION:=0.6.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.linuxkungfu.org/ipkungfu
|
PKG_SOURCE_URL:=http://www.linuxkungfu.org/ipkungfu
|
||||||
@ -24,6 +24,7 @@ define Package/ipkungfu
|
|||||||
TITLE:=IPKungFu is an iptables-based Linux firewall
|
TITLE:=IPKungFu is an iptables-based Linux firewall
|
||||||
URL:=http://www.linuxkungfu.org/
|
URL:=http://www.linuxkungfu.org/
|
||||||
SUBMENU:=firewall
|
SUBMENU:=firewall
|
||||||
|
DEPENDS:=+bash
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ipkungfu/description
|
define Package/ipkungfu/description
|
||||||
@ -47,7 +48,25 @@ define Package/ipkungfu/conffiles
|
|||||||
/etc/ipkungfu/vhosts.conf
|
/etc/ipkungfu/vhosts.conf
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/ipkungfu/postrm
|
||||||
|
#!/bin/sh
|
||||||
|
rm -rf /etc/ipkungfu/cache
|
||||||
|
rmdir /etc/ipkungfu 2>/dev/null || true
|
||||||
|
endef
|
||||||
|
|
||||||
# uses GNU configure
|
# uses GNU configure
|
||||||
|
CONFIGURE_VARS+= \
|
||||||
|
ac_cv_path_IPTABLES="/usr/sbin/iptables" \
|
||||||
|
ac_cv_path_MD5SUM="/usr/bin/md5sum" \
|
||||||
|
ac_cv_path_MODPROBE="/sbin/insmod" \
|
||||||
|
ac_cv_path_RMMOD="/sbin/rmmode" \
|
||||||
|
ac_cv_path_DEPMOD="/bin/true" \
|
||||||
|
ac_cv_path_LSMOD="/sbin/lsmod" \
|
||||||
|
ac_cv_path_CUT="/usr/bincut" \
|
||||||
|
ac_cv_path_TR="/usr/bintr" \
|
||||||
|
ac_cv_path_GREP="/bin/grep" \
|
||||||
|
ac_cv_path_SED="/bin/sed" \
|
||||||
|
ac_cv_path_AWK="/usr/bin/awk" \
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
@ -55,10 +74,10 @@ define Build/Compile
|
|||||||
all install
|
all install
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ipkungfu/install
|
define Package/ipkungfu/install
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(CP) $(PKG_BUILD_DIR)/dummy_server $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dummy_server $(1)/usr/sbin/
|
||||||
$(CP) $(PKG_BUILD_DIR)/ipkungfu $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ipkungfu $(1)/usr/sbin/
|
||||||
$(INSTALL_DIR) $(1)/etc/ipkungfu/
|
$(INSTALL_DIR) $(1)/etc/ipkungfu/
|
||||||
$(CP) $(PKG_BUILD_DIR)/files/conf/* $(1)/etc/ipkungfu/
|
$(CP) $(PKG_BUILD_DIR)/files/conf/* $(1)/etc/ipkungfu/
|
||||||
endef
|
endef
|
||||||
|
22
net/ipkungfu/patches/001-replace-modprobe-with-insmod.patch
Normal file
22
net/ipkungfu/patches/001-replace-modprobe-with-insmod.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
Index: ipkungfu-0.6.1/ipkungfu.in
|
||||||
|
===================================================================
|
||||||
|
--- ipkungfu-0.6.1.orig/ipkungfu.in 2007-01-21 19:47:04.000000000 -0800
|
||||||
|
+++ ipkungfu-0.6.1/ipkungfu.in 2008-08-03 11:41:13.000000000 -0700
|
||||||
|
@@ -618,7 +618,7 @@
|
||||||
|
# they're built in.
|
||||||
|
DEFAULT_MODULES_LIST="ip_nat_irc ip_conntrack_ftp ip_nat_ftp ip_conntrack_irc"
|
||||||
|
for default_module in $DEFAULT_MODULES_LIST; do
|
||||||
|
- if [ -f $($MODPROBE -la | grep ${default_module}) ]; then
|
||||||
|
+ if [ -f $(find /lib/modules/$(uname -r) -name "${default_module}*") ]; then
|
||||||
|
$MODPROBE ${default_module} 2>&1 | logError
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
@@ -627,7 +627,7 @@
|
||||||
|
MODULES_ARRAY=(${MODULES_LIST})
|
||||||
|
|
||||||
|
for module in ${MODULES_ARRAY[@]}; do
|
||||||
|
- if [ -e /lib/modules/`uname -r`/kernel/net/ipv4/netfilter/${module}* ]; then
|
||||||
|
+ if [ -e /lib/modules/`uname -r`/${module}* ]; then
|
||||||
|
if [ -z "`${LSMOD} | grep ${module}`" ] ; then
|
||||||
|
if [ $INIT != 1 ] ; then
|
||||||
|
echo -n -e "Loading ${BRIGHT_COLOUR}${module}${CLOSE_COLOUR} module..."
|
Loading…
x
Reference in New Issue
Block a user