Magellan Linux

Contents of /branches/magellan-next/core/iptables/iptables-1.4.11.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8556 - (show annotations) (download)
Thu Jul 21 23:21:44 2011 UTC (12 years, 9 months ago) by niro
File size: 2289 byte(s)
auto added: ver bump to 1.4.11.1-r1
1 # $Id$
2
3 PNAME="iptables"
4 PVER="1.4.11.1"
5 PBUILD="r1"
6
7 PCATEGORIE="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=""
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 RC_CVS_REV=1.3
22
23 SRC_URI=(
24 http://www.netfilter.org/projects/${PNAME}/files/${SRCFILE}
25 mirror://${PNAME}/${SRCFILE}
26 mirror://${PNAME}/iptables.rc-${RC_CVS_REV}
27 mirror://${PNAME}/iptables.confd
28 )
29
30 # exclude rc versions
31 UP2DATE="updatecmd 'http://www.netfilter.org/projects/${PNAME}/files?C=M;O=A' | grep -v '.*rc.*' | lasttarball"
32
33 src_compile()
34 {
35 cd ${SRCDIR}
36
37 mconfigure \
38 --sbindir=/sbin \
39 --libexecdir=/$(mlibdir) \
40 --without-kernel \
41 --enable-devel \
42 --enable-libipq \
43 --enable-shared \
44 --enable-static \
45 || die
46
47 mmake || die
48 }
49
50 src_install()
51 {
52 cd ${SRCDIR}
53 mmake DESTDIR=${BINDIR} install || die
54
55 # installs headers
56 minstalldir /usr/include/libiptc || die
57 minstalldir /usr/$(mlibdir) || die
58 minstalldir /usr/$(mlibdir)/iptables || die
59 minstallfile include/iptables.h /usr/include || die
60 minstallfile include/ip6tables.h /usr/include || die
61 minstallfile include/iptables/internal.h /usr/include/iptables || die
62 # the makefile seems to handle them now correctly
63 # minstallfile libiptc/libiptc.a /usr/$(mlibdir) || die
64 # minstallfile include/libiptc/\*.h /usr/include/libiptc || die
65
66 # install iptables rc & conf.d for ipv4
67 minstallconf iptables.confd iptables || die
68 minstallrc iptables.rc-${RC_CVS_REV} iptables || die
69
70 # now for ipv6; some line needs to be seded
71 minstallconf iptables.confd ip6tables || die
72 minstallrc iptables.rc-${RC_CVS_REV} 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}/etc/rc.d/init.d/ip6tables || die
81
82 # prevents removing of iptables-save default path
83 mkeepdir /var/lib/iptables || die
84
85 # docs
86 minstalldocs COPYING INCOMPATIBILITIES || die
87 }