blob: 324a44679381aff0c447c2c54f7a010264864793 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#!/bin/sh
NAME="iptables"
DESC="Linux kernel firewall, NAT and packet mangling tools"
MAKEDEPS=" linux-headers libnftnl bison flex autoconf automake"
PKG_VER=1.8.8
SOURCE="https://www.netfilter.org/projects/iptables/files/iptables-$PKG_VER.tar.bz2"
ADDITIONAL="
ebtables.confd
ebtables.initd
fix-u_int16_t.patch
fix-xtables.patch
ip6tables.confd
iptables.confd
iptables.initd
use-sh-iptables-apply.patch
"
prepare () {
apply_patches
}
build() {
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--sbindir=/sbin \
--sysconfdir=/etc \
--without-kernel \
--enable-devel \
--enable-libipq \
--enable-shared
# do not use rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make
}
package() {
make -j1 install DESTDIR="$PKG_DEST"
mkdir -p "$PKG_DEST"/usr/include/libiptc \
"$PKG_DEST"/usr/lib \
"$PKG_DEST"/var/lib/iptables \
"$PKG_DEST"/etc/iptables
install -m644 include/iptables.h include/ip6tables.h \
"$PKG_DEST"/usr/include/
install include/libiptc/*.h "$PKG_DEST"/usr/include/libiptc/
install -D -m755 "$BUILD_ROOT"/iptables.initd "$PKG_DEST"/etc/init.d/iptables
install -D -m644 "$BUILD_ROOT"/iptables.confd "$PKG_DEST"/etc/conf.d/iptables
install -D -m755 "$BUILD_ROOT"/ebtables.initd "$PKG_DEST"/etc/init.d/ebtables
install -D -m644 "$BUILD_ROOT"/ebtables.confd "$PKG_DEST"/etc/conf.d/ebtables
}
|