Annotation of /trunk/core/iptables/iptables-1.8.3-r1.smage2
Parent Directory | Revision Log
Revision 33010 -
(hide annotations)
(download)
Wed Oct 9 12:57:37 2019 UTC (4 years, 11 months ago) by niro
File size: 3104 byte(s)
Wed Oct 9 12:57:37 2019 UTC (4 years, 11 months ago) by niro
File size: 3104 byte(s)
auto added: ver bump to 1.8.3-r1
1 | niro | 33010 | # $Id$ |
2 | |||
3 | PNAME="iptables" | ||
4 | PVER="1.8.3" | ||
5 | PBUILD="r1" | ||
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 | |||
20 | SRCFILE="${PNAME}-${PVER}.tar.bz2" | ||
21 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
22 | |||
23 | sminclude mtools mbuild systemd | ||
24 | msetfeature "!check" | ||
25 | |||
26 | # cvs revisions | ||
27 | SCRIPT_REV=1.4 | ||
28 | CONFD_REV=1.2 | ||
29 | SVC_REV=1.2 | ||
30 | |||
31 | SRC_URI=( | ||
32 | http://www.netfilter.org/projects/${PNAME}/files/${SRCFILE} | ||
33 | mirror://${PNAME}/${SRCFILE} | ||
34 | mirror://${PNAME}/iptables.sh-${SCRIPT_REV} | ||
35 | mirror://${PNAME}/iptables.confd-${CONFD_REV} | ||
36 | mirror://${PNAME}/iptables.service-${SVC_REV} | ||
37 | ) | ||
38 | |||
39 | # exclude rc versions | ||
40 | UP2DATE="updatecmd http://www.netfilter.org/projects/${PNAME}/files | grep -v '.*rc.*' | highesttarball" | ||
41 | |||
42 | src_compile() | ||
43 | { | ||
44 | cd ${SRCDIR} | ||
45 | |||
46 | mconfigure \ | ||
47 | --libexecdir=/usr/$(mlibdir) \ | ||
48 | --without-kernel \ | ||
49 | --enable-devel \ | ||
50 | --enable-libipq \ | ||
51 | --enable-nftables \ | ||
52 | --enable-bpf-compiler \ | ||
53 | --enable-nfsynproxy \ | ||
54 | || die | ||
55 | |||
56 | # fix parallel make errors | ||
57 | make -C iptables xtables-config-parser.h || die | ||
58 | |||
59 | mmake || die | ||
60 | } | ||
61 | |||
62 | src_install() | ||
63 | { | ||
64 | cd ${SRCDIR} | ||
65 | mmake DESTDIR=${BINDIR} install || die | ||
66 | |||
67 | # installs headers | ||
68 | minstalldir /usr/include/libiptc || die | ||
69 | minstalldir /usr/$(mlibdir) || die | ||
70 | minstalldir /usr/$(mlibdir)/iptables || die | ||
71 | minstallfile include/iptables.h /usr/include || die | ||
72 | minstallfile include/ip6tables.h /usr/include || die | ||
73 | minstallfile include/iptables/internal.h /usr/include/iptables || die | ||
74 | # the makefile seems to handle them now correctly | ||
75 | # minstallfile libiptc/libiptc.a /usr/$(mlibdir) || die | ||
76 | # minstallfile include/libiptc/\*.h /usr/include/libiptc || die | ||
77 | |||
78 | # install iptables rc & conf.d for ipv4 | ||
79 | minstallconf iptables.confd-${CONFD_REV} iptables || die | ||
80 | minstalldir /usr/lib/systemd || die | ||
81 | minstallexec -s iptables.sh-${SCRIPT_REV} /usr/lib/systemd/magellan-iptables || die | ||
82 | minstallunit iptables.service-${SVC_REV} iptables.service || die | ||
83 | |||
84 | # now for ipv6; some line needs to be seded | ||
85 | minstallconf iptables.confd-${CONFD_REV} ip6tables || die | ||
86 | minstallexec -s iptables.sh-${SCRIPT_REV} /usr/lib/systemd/magellan-ip6tables || die | ||
87 | minstallunit iptables.service-${SVC_REV} ip6tables.service || die | ||
88 | |||
89 | # fix iptables-cmds for ipv6 | ||
90 | sed -i -e "s:^\(SVC_NAME=\).*:\1ip6tables:" \ | ||
91 | -e "s:^\(IPTABLES=\).*:\1/usr/bin/ip6tables:" \ | ||
92 | -e "s:^\(IPTABLES_SAVE=\).*:\1/usr/bin/ip6tables-save:" \ | ||
93 | -e "s:^\(IPTABLES_RESTORE=\).*:\1/usr/bin/ip6tables-restore:" \ | ||
94 | -e "s:^\(IPTABLES_PROC=\).*:\1/proc/net/ip6_tables_names:" \ | ||
95 | ${BINDIR}/usr/lib/systemd/magellan-ip6tables || die | ||
96 | sed -i -e "s:IPv4:IPv6:g" \ | ||
97 | -e "s:iptables:ip6tables:g" \ | ||
98 | ${BINDIR}/usr/lib/systemd/system/ip6tables.service || die | ||
99 | sed -i -e "s:iptables:ip6tables:g" \ | ||
100 | ${BINDIR}/etc/conf.d/ip6tables || die | ||
101 | |||
102 | # prevents removing of iptables-save default path | ||
103 | mkeepdir /var/lib/iptables || die | ||
104 | mkeepdir /var/lib/ip6tables || die | ||
105 | |||
106 | # docs | ||
107 | minstalldocs COPYING INCOMPATIBILITIES || die | ||
108 | } |