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