Magellan Linux

Contents of /smage/trunk/extras/iptables/iptables-1.8.2-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13043 - (show annotations) (download)
Mon Mar 18 15:02:49 2019 UTC (5 years, 1 month ago) by niro
File size: 3342 byte(s)
auto added: ver bump to 1.8.2-r3
1 # $Id$
2
3 PNAME="iptables"
4 PVER="1.8.2"
5 PBUILD="r3"
6
7 PCAT="net-misc"
8
9 DESCRIPTION="iptables is used to create internet firewalls based on stateless and stateful packet filtering."
10 HOMEPAGE="http://www.netfilter.org/"
11
12 DEPEND=">= net-libs/libmnl-1
13 >= net-libs/libnftnl-1
14 >= net-libs/libpcap-1.9"
15
16 SDEPEND=">= virtual/kernel-headers
17 >= sys-dev/flex-2.6
18 >= sys-dev/bison-3
19 >= net-libs/libmnl-dev-1
20 >= net-libs/libnftnl-dev-1
21 >= net-libs/libpcap-dev-1.9"
22
23 SRCFILE="${PNAME}-${PVER}.tar.bz2"
24 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
25
26 ALX_PKG_KEEP="usr/$(mlibdir)/*.so.*
27 usr/$(mlibdir)/iptables
28 usr/$(mlibdir)/xtables
29 usr/lib/systemd
30 var/lib etc usr/bin usr/sbin"
31 sminclude mtools mbuild systemd alx-split
32 msetfeature "!check"
33
34 # cvs revisions
35 SCRIPT_REV=1.4
36 CONFD_REV=1.2
37 SVC_REV=1.2
38
39 SRC_URI=(
40 http://www.netfilter.org/projects/${PNAME}/files/${SRCFILE}
41 mirror://${PNAME}/${SRCFILE}
42 mirror://${PNAME}/iptables.sh-${SCRIPT_REV}
43 mirror://${PNAME}/iptables.confd-${CONFD_REV}
44 mirror://${PNAME}/iptables.service-${SVC_REV}
45 )
46
47 # exclude rc versions
48 UP2DATE="updatecmd http://www.netfilter.org/projects/${PNAME}/files | grep -v '.*rc.*' | highesttarball"
49
50 src_compile()
51 {
52 cd ${SRCDIR}
53
54 mconfigure \
55 --libexecdir=/usr/$(mlibdir) \
56 --without-kernel \
57 --enable-devel \
58 --enable-libipq \
59 --enable-nftables \
60 --enable-bpf-compiler \
61 --enable-nfsynproxy \
62 || die
63
64 # fix parallel make errors
65 make -C iptables xtables-config-parser.h || die
66
67 mmake || die
68 }
69
70 alx_generic_src_install()
71 {
72 cd ${SRCDIR}
73 mmake DESTDIR=${BINDIR} install || die
74
75 # installs headers
76 minstalldir /usr/include/libiptc || die
77 minstalldir /usr/$(mlibdir) || die
78 minstalldir /usr/$(mlibdir)/iptables || die
79 minstallfile include/iptables.h /usr/include || die
80 minstallfile include/ip6tables.h /usr/include || die
81 minstallfile include/iptables/internal.h /usr/include/iptables || die
82 # the makefile seems to handle them now correctly
83 # minstallfile libiptc/libiptc.a /usr/$(mlibdir) || die
84 # minstallfile include/libiptc/\*.h /usr/include/libiptc || die
85
86 # install iptables rc & conf.d for ipv4
87 minstallconf iptables.confd-${CONFD_REV} iptables || die
88 minstalldir /usr/lib/systemd || die
89 minstallexec -s iptables.sh-${SCRIPT_REV} /usr/lib/systemd/magellan-iptables || die
90 minstallunit iptables.service-${SVC_REV} iptables.service || die
91
92 # now for ipv6; some line needs to be seded
93 minstallconf iptables.confd-${CONFD_REV} ip6tables || die
94 minstallexec -s iptables.sh-${SCRIPT_REV} /usr/lib/systemd/magellan-ip6tables || die
95 minstallunit iptables.service-${SVC_REV} ip6tables.service || die
96
97 # fix iptables-cmds for ipv6
98 sed -i -e "s:^\(SVC_NAME=\).*:\1ip6tables:" \
99 -e "s:^\(IPTABLES=\).*:\1/usr/bin/ip6tables:" \
100 -e "s:^\(IPTABLES_SAVE=\).*:\1/usr/bin/ip6tables-save:" \
101 -e "s:^\(IPTABLES_RESTORE=\).*:\1/usr/bin/ip6tables-restore:" \
102 -e "s:^\(IPTABLES_PROC=\).*:\1/proc/net/ip6_tables_names:" \
103 ${BINDIR}/usr/lib/systemd/magellan-ip6tables || die
104 sed -i -e "s:IPv4:IPv6:g" \
105 -e "s:iptables:ip6tables:g" \
106 ${BINDIR}/usr/lib/systemd/system/ip6tables.service || die
107 sed -i -e "s:iptables:ip6tables:g" \
108 ${BINDIR}/etc/conf.d/ip6tables || die
109
110 # prevents removing of iptables-save default path
111 mkeepdir /var/lib/iptables || die
112 mkeepdir /var/lib/ip6tables || die
113
114 # docs
115 minstalldocs COPYING INCOMPATIBILITIES || die
116 }