1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 03:35:38 +03:00
aports/testing/ipt-netflow/kernel-vs-userspace.patch
Natanael Copa 7b9d3a45f2 testing/ipt-netflow: fix build again
Use upstream source repo rather than Rush's github clone
2014-02-25 13:11:42 +00:00

56 lines
1.6 KiB
Diff

diff --git a/configure b/configure
index 3f10e2a..b43f024 100755
--- a/configure
+++ b/configure
@@ -256,6 +256,8 @@ do
--ipt-inc=*) IPTINC="$ac_optarg" ;;
--kver=*) KVERSION="$ac_optarg" ;;
--kdir=*) KDIR="$ac_optarg" ;;
+ --disable-kernel) NOKERNEL=1;;
+ --disable-ipt) NOIPT=1;;
--make) echo called from make ;;
--help) show_help ;;
-*) echo Invalid option: $ac_option; exit 1 ;;
@@ -353,22 +355,26 @@ kernel_check_config() {
kconfig CONFIG_IP6_NF_IPTABLES "ip6tables target"
}
-kernel_find_version #KVERSION
-test "$KLIBMOD" || KLIBMOD=$KVERSION
-echo "Kernel version: $KVERSION ($KHOW)"
-kernel_find_source #KDIR
-echo "Kernel sources: $KDIR ($KSHOW)"
-kernel_check_consistency
-kernel_check_config
-
-test "$IPTBIN" || IPTBIN=`which iptables`
-
-iptables_find_version #IPTVER
-iptables_try_pkgconfig #try to configure from pkg-config
-iptables_find_src #IPTSRC
-iptables_src_version #check that IPTSRC match to IPTVER
-iptables_inc #IPTINC
-iptables_modules #IPTLIB
+if ! test "$NOKERNEL"; then
+ kernel_find_version #KVERSION
+ test "$KLIBMOD" || KLIBMOD=$KVERSION
+ echo "Kernel version: $KVERSION ($KHOW)"
+ kernel_find_source #KDIR
+ echo "Kernel sources: $KDIR ($KSHOW)"
+ kernel_check_consistency
+ kernel_check_config
+fi
+
+if ! test "$NOIPT"; then
+ test "$IPTBIN" || IPTBIN=`which iptables`
+
+ iptables_find_version #IPTVER
+ iptables_try_pkgconfig #try to configure from pkg-config
+ iptables_find_src #IPTSRC
+ iptables_src_version #check that IPTSRC match to IPTVER
+ iptables_inc #IPTINC
+ iptables_modules #IPTLIB
+fi
REPLACE="\
s!@KVERSION@!$KVERSION!;\