Magellan Linux

Annotation of /smage/trunk/extras/iptables/iptables-1.8.2-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13047 - (hide annotations) (download)
Mon Mar 18 15:39:12 2019 UTC (5 years, 1 month ago) by niro
File size: 3428 byte(s)
auto added: ver bump to 1.8.2-r4
1 niro 13047 # $Id$
2    
3     PNAME="iptables"
4     PVER="1.8.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=">= net-libs/libmnl-1
13     >= net-libs/libnftnl-1
14     >= net-libs/libpcap-1.9"
15    
16     # runtime deps to satisfy builds against iptables
17     ALX_DEV_DEPEND=">= net-libs/libmnl-dev-1
18     >= net-libs/libnftnl-dev-1
19     >= net-libs/libpcap-dev-1.9"
20    
21     SDEPEND=">= virtual/kernel-headers
22     >= sys-dev/flex-2.6
23     >= sys-dev/bison-3
24     ${ALX_DEV_DEPEND}"
25    
26     SRCFILE="${PNAME}-${PVER}.tar.bz2"
27     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
28    
29     ALX_PKG_KEEP="usr/$(mlibdir)/*.so.*
30     usr/$(mlibdir)/iptables
31     usr/$(mlibdir)/xtables
32     usr/lib/systemd
33     var/lib etc usr/bin usr/sbin"
34     sminclude mtools mbuild systemd alx-split
35     msetfeature "!check"
36    
37     # cvs revisions
38     SCRIPT_REV=1.4
39     CONFD_REV=1.2
40     SVC_REV=1.2
41    
42     SRC_URI=(
43     http://www.netfilter.org/projects/${PNAME}/files/${SRCFILE}
44     mirror://${PNAME}/${SRCFILE}
45     mirror://${PNAME}/iptables.sh-${SCRIPT_REV}
46     mirror://${PNAME}/iptables.confd-${CONFD_REV}
47     mirror://${PNAME}/iptables.service-${SVC_REV}
48     )
49    
50     # exclude rc versions
51     UP2DATE="updatecmd http://www.netfilter.org/projects/${PNAME}/files | grep -v '.*rc.*' | highesttarball"
52    
53     src_compile()
54     {
55     cd ${SRCDIR}
56    
57     mconfigure \
58     --libexecdir=/usr/$(mlibdir) \
59     --without-kernel \
60     --enable-devel \
61     --enable-libipq \
62     --enable-nftables \
63     --enable-bpf-compiler \
64     --enable-nfsynproxy \
65     || die
66    
67     # fix parallel make errors
68     make -C iptables xtables-config-parser.h || die
69    
70     mmake || die
71     }
72    
73     alx_generic_src_install()
74     {
75     cd ${SRCDIR}
76     mmake DESTDIR=${BINDIR} install || die
77    
78     # installs headers
79     minstalldir /usr/include/libiptc || die
80     minstalldir /usr/$(mlibdir) || die
81     minstalldir /usr/$(mlibdir)/iptables || die
82     minstallfile include/iptables.h /usr/include || die
83     minstallfile include/ip6tables.h /usr/include || die
84     minstallfile include/iptables/internal.h /usr/include/iptables || die
85     # the makefile seems to handle them now correctly
86     # minstallfile libiptc/libiptc.a /usr/$(mlibdir) || die
87     # minstallfile include/libiptc/\*.h /usr/include/libiptc || die
88    
89     # install iptables rc & conf.d for ipv4
90     minstallconf iptables.confd-${CONFD_REV} iptables || die
91     minstalldir /usr/lib/systemd || die
92     minstallexec -s iptables.sh-${SCRIPT_REV} /usr/lib/systemd/magellan-iptables || die
93     minstallunit iptables.service-${SVC_REV} iptables.service || die
94    
95     # now for ipv6; some line needs to be seded
96     minstallconf iptables.confd-${CONFD_REV} ip6tables || die
97     minstallexec -s iptables.sh-${SCRIPT_REV} /usr/lib/systemd/magellan-ip6tables || die
98     minstallunit iptables.service-${SVC_REV} ip6tables.service || die
99    
100     # fix iptables-cmds for ipv6
101     sed -i -e "s:^\(SVC_NAME=\).*:\1ip6tables:" \
102     -e "s:^\(IPTABLES=\).*:\1/usr/bin/ip6tables:" \
103     -e "s:^\(IPTABLES_SAVE=\).*:\1/usr/bin/ip6tables-save:" \
104     -e "s:^\(IPTABLES_RESTORE=\).*:\1/usr/bin/ip6tables-restore:" \
105     -e "s:^\(IPTABLES_PROC=\).*:\1/proc/net/ip6_tables_names:" \
106     ${BINDIR}/usr/lib/systemd/magellan-ip6tables || die
107     sed -i -e "s:IPv4:IPv6:g" \
108     -e "s:iptables:ip6tables:g" \
109     ${BINDIR}/usr/lib/systemd/system/ip6tables.service || die
110     sed -i -e "s:iptables:ip6tables:g" \
111     ${BINDIR}/etc/conf.d/ip6tables || die
112    
113     # prevents removing of iptables-save default path
114     mkeepdir /var/lib/iptables || die
115     mkeepdir /var/lib/ip6tables || die
116    
117     # docs
118     minstalldocs COPYING INCOMPATIBILITIES || die
119     }