Magellan Linux

Contents of /trunk/core/iptables/iptables-1.4.12.2-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11582 - (show annotations) (download)
Tue Mar 13 09:10:24 2012 UTC (12 years, 3 months ago) by niro
File size: 2506 byte(s)
-removed systemd unit in favor of firewalld
1 # $Id$
2
3 PNAME="iptables"
4 PVER="1.4.12.2"
5 PBUILD="r4"
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=">= virtual/glibc"
13 SDEPEND=">= virtual/kernel-headers"
14
15 SRCFILE="${PNAME}-${PVER}.tar.bz2"
16 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
17
18 sminclude mtools mbuild
19
20 # cvs revisions
21 SCRIPT_REV=1.2
22 CONFD_REV=1.2
23
24 SRC_URI=(
25 http://www.netfilter.org/projects/${PNAME}/files/${SRCFILE}
26 mirror://${PNAME}/${SRCFILE}
27 mirror://${PNAME}/iptables.sh-${SCRIPT_REV}
28 mirror://${PNAME}/iptables.confd-${CONFD_REV}
29 )
30
31 # exclude rc versions
32 UP2DATE="updatecmd 'http://www.netfilter.org/projects/${PNAME}/files?C=M;O=A' | grep -v '.*rc.*' | lasttarball"
33
34 src_compile()
35 {
36 cd ${SRCDIR}
37
38 mconfigure \
39 --sbindir=/sbin \
40 --libexecdir=/$(mlibdir) \
41 --without-kernel \
42 --enable-devel \
43 --enable-libipq \
44 || die
45
46 mmake || die
47 }
48
49 src_install()
50 {
51 cd ${SRCDIR}
52 mmake DESTDIR=${BINDIR} install || die
53
54 # installs headers
55 minstalldir /usr/include/libiptc || die
56 minstalldir /usr/$(mlibdir) || die
57 minstalldir /usr/$(mlibdir)/iptables || die
58 minstallfile include/iptables.h /usr/include || die
59 minstallfile include/ip6tables.h /usr/include || die
60 minstallfile include/iptables/internal.h /usr/include/iptables || die
61 # the makefile seems to handle them now correctly
62 # minstallfile libiptc/libiptc.a /usr/$(mlibdir) || die
63 # minstallfile include/libiptc/\*.h /usr/include/libiptc || die
64
65 # install iptables rc & conf.d for ipv4
66 minstallconf iptables.confd-${CONFD_REV} iptables || die
67 minstalldir /usr/lib/systemd || die
68 minstallexec -s iptables.sh /usr/lib/systemd/magellan-iptables || die
69
70 # now for ipv6; some line needs to be seded
71 minstallconf iptables.confd-${CONFD_REV} ip6tables || die
72 minstallexec -s iptables.sh /usr/lib/systemd/magellan-ip6tables || die
73
74 # fix iptables-cmds for ipv6
75 sed -i -e "s:^\(SVC_NAME=\).*:\1ip6tables:" \
76 -e "s:^\(IPTABLES=\).*:\1/sbin/ip6tables:" \
77 -e "s:^\(IPTABLES_SAVE=\).*:\1/sbin/ip6tables-save:" \
78 -e "s:^\(IPTABLES_RESTORE=\).*:\1/sbin/ip6tables-restore:" \
79 -e "s:^\(IPTABLES_PROC=\).*:\1/proc/net/ip6_tables_names:" \
80 ${BINDIR}/usr/lib/systemd/magellan-ip6tables || die
81 sed -i -e "s:iptables:ip6tables:g" \
82 ${BINDIR}/etc/conf.d/ip6tables || die
83
84 # prevents removing of iptables-save default path
85 mkeepdir /var/lib/iptables || die
86 mkeepdir /var/lib/ip6tables || die
87
88 # docs
89 minstalldocs COPYING INCOMPATIBILITIES || die
90 }