Magellan Linux

Contents of /trunk/core/iptables/iptables-1.4.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 125 - (show annotations) (download)
Tue Oct 14 11:50:54 2008 UTC (15 years, 7 months ago) by niro
File size: 2742 byte(s)
-move to "core"
1 # $Header: /magellan-cvs/smage/iptables/iptables-1.4.0-r2.smage2,v 1.2 2008/05/01 16:17:53 niro Exp $
2
3 PNAME="iptables"
4 PVER="1.4.1"
5 PBUILD="r1"
6
7 PCATEGORIE="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=""
14 SDEPEND=">= virtual/kernel-headers"
15
16 SRCFILE="${PNAME}-${PVER}.tar.bz2"
17 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
18
19 sminclude mtools
20
21 # cvs revisions
22 IPTABLES_RC=iptables.rc-1.2
23
24 SRC_URI=(
25 http://www.netfilter.org/projects/${PNAME}/files/${SRCFILE}
26 mirror://${PNAME}/${SRCFILE}
27 mirror://${PNAME}/${IPTABLES_RC}
28 mirror://${PNAME}/iptables.confd
29 mirror://${PNAME}/${PNAME}-1.3.1-grsecurity-1.2.8.patch
30 mirror://${PNAME}/${PNAME}-1.4.0-install-all-dev-files-2.patch
31 )
32
33 # exclude rc versions
34 UP2DATE="updatecmd 'http://www.netfilter.org/projects/${PNAME}/files?C=M;O=A' | grep -v '.*rc.*' | lasttarball"
35
36 src_prepare()
37 {
38 munpack ${SRCFILE} || die
39 cd ${SRCDIR}
40
41 # enable grsecurity stealth modules
42 mpatch ${PNAME}-1.3.1-grsecurity-1.2.8.patch || die
43
44 # make sure all devs will be installed (needed with udev)
45 mpatch ${PNAME}-1.4.0-install-all-dev-files-2.patch || die
46
47 # enable stealth modules
48 sed -i "s/PF_EXT_SLIB:=/PF_EXT_SLIB:=stealth /g" extensions/Makefile || die
49
50 # compilation fix
51 echo "#define __user" > include/linux/compiler.h || die
52 }
53
54 src_compile()
55 {
56 cd ${SRCDIR}
57
58 mmake COPT_FLAGS="${CFLAGS}" \
59 PREFIX= \
60 LIBDIR=/$(mlibdir) \
61 BINDIR=/sbin \
62 MANDIR=/usr/share/man \
63 INCDIR=/usr/include \
64 KERNEL_DIR=/usr \
65 || die
66 }
67
68 src_install()
69 {
70 cd ${SRCDIR}
71
72 mmake DESTDIR=${BINDIR} \
73 LIBDIR=/$(mlibdir) \
74 BINDIR=/sbin \
75 MANDIR=/usr/share/man \
76 INCDIR=/usr/include \
77 KERNEL_DIR=/usr \
78 install || die
79
80 # installs headers
81 mmake DESTDIR=${BINDIR} \
82 LIBDIR=/usr/$(mlibdir) \
83 BINDIR=/sbin \
84 MANDIR=/usr/share/man \
85 INCDIR=/usr/include \
86 KERNEL_DIR=/usr \
87 install-devel || die
88
89 # install iptables rc & conf.d for ipv4
90 minstallconf iptables.confd iptables || die
91 minstallrc ${IPTABLES_RC} iptables || die
92
93 # now for ipv6; some line needs to be seded
94 minstallconf iptables.confd ip6tables || die
95 minstallrc ${IPTABLES_RC} ip6tables || die
96
97 # fix iptables-cmds for ipv6
98 sed -i -e "s:^\(SVC_NAME=\).*:\1ip6tables:" \
99 -e "s:^\(IPTABLES=\).*:\1/sbin/ip6tables:" \
100 -e "s:^\(IPTABLES_SAVE=\).*:\1/sbin/ip6tables-save:" \
101 -e "s:^\(IPTABLES_RESTORE=\).*:\1/sbin/ip6tables-restore:" \
102 -e "s:^\(IPTABLES_PROC=\).*:\1/proc/net/ip6_tables_names:" \
103 ${BINDIR}/etc/rc.d/init.d/ip6tables || die
104
105 # prevents removing of iptables-save default path
106 mkeepdir /var/lib/iptables || die
107
108 # docs
109 minstalldocs COMMIT_NOTES COPYING INCOMPATIBILITIES || die
110 }

Properties

Name Value
svn:keywords Id