Contents of /trunk/core/iptables/iptables-1.4.14-r2.smage2
Parent Directory | Revision Log
Revision 12753 -
(show annotations)
(download)
Mon Jul 2 14:37:15 2012 UTC (11 years, 11 months ago) by niro
File size: 2876 byte(s)
Mon Jul 2 14:37:15 2012 UTC (11 years, 11 months ago) by niro
File size: 2876 byte(s)
-marked unstable
1 | # $Id$ |
2 | |
3 | PNAME="iptables" |
4 | PVER="1.4.14" |
5 | PBUILD="r2" |
6 | |
7 | PCAT="net-misc" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="iptables is used to create internet firewalls based on stateless and stateful packet filtering." |
11 | HOMEPAGE="http://www.netfilter.org/" |
12 | |
13 | DEPEND=">= virtual/glibc" |
14 | SDEPEND=">= virtual/kernel-headers" |
15 | |
16 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
17 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
18 | |
19 | sminclude mtools mbuild |
20 | msetfeature "!check" |
21 | |
22 | # cvs revisions |
23 | SCRIPT_REV=1.3 |
24 | CONFD_REV=1.2 |
25 | SVC_REV=1.2 |
26 | |
27 | SRC_URI=( |
28 | http://www.netfilter.org/projects/${PNAME}/files/${SRCFILE} |
29 | mirror://${PNAME}/${SRCFILE} |
30 | mirror://${PNAME}/iptables.sh-${SCRIPT_REV} |
31 | mirror://${PNAME}/iptables.confd-${CONFD_REV} |
32 | mirror://${PNAME}/iptables.service-${SVC_REV} |
33 | ) |
34 | |
35 | # exclude rc versions |
36 | UP2DATE="updatecmd 'http://www.netfilter.org/projects/${PNAME}/files?C=M;O=A' | grep -v '.*rc.*' | lasttarball" |
37 | |
38 | src_compile() |
39 | { |
40 | cd ${SRCDIR} |
41 | |
42 | mconfigure \ |
43 | --libexecdir=/usr/$(mlibdir) \ |
44 | --without-kernel \ |
45 | --enable-devel \ |
46 | --enable-libipq \ |
47 | || die |
48 | |
49 | mmake || die |
50 | } |
51 | |
52 | src_install() |
53 | { |
54 | cd ${SRCDIR} |
55 | mmake DESTDIR=${BINDIR} install || die |
56 | |
57 | # installs headers |
58 | minstalldir /usr/include/libiptc || die |
59 | minstalldir /usr/$(mlibdir) || die |
60 | minstalldir /usr/$(mlibdir)/iptables || die |
61 | minstallfile include/iptables.h /usr/include || die |
62 | minstallfile include/ip6tables.h /usr/include || die |
63 | minstallfile include/iptables/internal.h /usr/include/iptables || die |
64 | # the makefile seems to handle them now correctly |
65 | # minstallfile libiptc/libiptc.a /usr/$(mlibdir) || die |
66 | # minstallfile include/libiptc/\*.h /usr/include/libiptc || die |
67 | |
68 | # install iptables rc & conf.d for ipv4 |
69 | minstallconf iptables.confd-${CONFD_REV} iptables || die |
70 | minstalldir /usr/lib/systemd || die |
71 | minstallexec -s iptables.sh-${SCRIPT_REV} /usr/lib/systemd/magellan-iptables || die |
72 | minstallunit iptables.service-${SVC_REV} iptables.service || die |
73 | |
74 | # now for ipv6; some line needs to be seded |
75 | minstallconf iptables.confd-${CONFD_REV} ip6tables || die |
76 | minstallexec -s iptables.sh-${SCRIPT_REV} /usr/lib/systemd/magellan-ip6tables || die |
77 | minstallunit iptables.service-${SVC_REV} ip6tables.service || die |
78 | |
79 | # fix iptables-cmds for ipv6 |
80 | sed -i -e "s:^\(SVC_NAME=\).*:\1ip6tables:" \ |
81 | -e "s:^\(IPTABLES=\).*:\1/usr/bin/ip6tables:" \ |
82 | -e "s:^\(IPTABLES_SAVE=\).*:\1/usr/bin/ip6tables-save:" \ |
83 | -e "s:^\(IPTABLES_RESTORE=\).*:\1/usr/bin/ip6tables-restore:" \ |
84 | -e "s:^\(IPTABLES_PROC=\).*:\1/proc/net/ip6_tables_names:" \ |
85 | ${BINDIR}/usr/lib/systemd/magellan-ip6tables || die |
86 | sed -i -e "s:IPv4:IPv6:g" \ |
87 | -e "s:iptables:ip6tables:g" \ |
88 | ${BINDIR}/usr/lib/systemd/system/ip6tables.service || die |
89 | sed -i -e "s:iptables:ip6tables:g" \ |
90 | ${BINDIR}/etc/conf.d/ip6tables || die |
91 | |
92 | # prevents removing of iptables-save default path |
93 | mkeepdir /var/lib/iptables || die |
94 | mkeepdir /var/lib/ip6tables || die |
95 | |
96 | # docs |
97 | minstalldocs COPYING INCOMPATIBILITIES || die |
98 | } |