1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = Networking/Tools
11 url = http://www.netfilter.org/
13 summary = Tools for managing Linux kernel packet filtering capabilities.
16 The iptables utility controls the network packet filtering code in the \
17 Linux kernel. If you need to set up firewalls and/or IP masquerading, \
18 you should install this package.
21 source_dl = http://ftp.netfilter.org/pub/iptables/
22 sources = %{thisapp}.tar.bz2
30 CFLAGS += -fno-strict-aliasing
32 configure_options += \
38 --with-pkgconfigdir=/usr/lib/pkgconfig \
39 --mandir=/usr/share/man \
47 # Make more space for target name on output.
48 cd iptables && sed -e "s/%-9s/%-18s/g" -i ip{,6}tables.c
52 # install ip*tables.h header files
53 mkdir -pv %{BUILDROOT}/usr/include/{iptables,libiptc}
54 install -v -m 644 include/ip{,6}tables.h \
55 %{BUILDROOT}/usr/include
56 install -v -m 644 include/iptables/internal.h \
57 %{BUILDROOT}/usr/include/iptables/
58 install -v -m 644 include/libiptc/*.h \
59 %{BUILDROOT}/usr/include/libiptc
61 mkdir -pv %{BUILDROOT}/usr/lib
62 rm -vf %{BUILDROOT}/lib/libip{tc,4tc,6tc,q}.so %{BUILDROOT}/lib/libxtables.so
63 ln -svf ../../lib/libiptc.so.0 %{BUILDROOT}/usr/lib/libiptc.so
64 ln -svf ../../lib/libip4tc.so.0 %{BUILDROOT}/usr/lib/libip4tc.so
65 ln -svf ../../lib/libip6tc.so.0 %{BUILDROOT}/usr/lib/libip6tc.so
66 ln -svf ../../lib/libipq.so.0 %{BUILDROOT}/usr/lib/libipq.so
67 ln -svf ../../lib/libxtables.so.7 %{BUILDROOT}/usr/lib/libxtables.so
69 # Replace absolute symlink
70 ln -svf ../sbin/xtables-multi %{BUILDROOT}/bin/iptables-xml
72 # Move binary which links to /usr/lib to /usr.
73 mkdir -pv %{BUILDROOT}/usr/sbin
74 mv -v %{BUILDROOT}/{,usr/}sbin/nfnl_osf
87 package %{name}-debuginfo