Magellan Linux

Annotation of /branches/R11-unstable/core/iptables/iptables-1.4.21-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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