blob: 604065120f784b0db19199df2ab585d59bbd6fd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# $Id: PKGBUILD 148436 2012-01-31 20:35:00Z ronald $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>
pkgname=iptables
pkgver=1.4.12.2
pkgrel=1
pkgdesc='Linux kernel packet control tool'
arch=('i686' 'x86_64' 'mips64el')
license=('GPL2')
url='http://www.netfilter.org/projects/iptables/index.html'
depends=('glibc' 'bash')
makedepends=('linux-api-headers')
options=('!libtool')
source=("http://www.iptables.org/projects/iptables/files/${pkgname}-${pkgver}.tar.bz2"
iptables
ip6tables
empty.rules
simple_firewall.rules
iptables.conf.d
empty-filter.rules
empty-mangle.rules
empty-nat.rules
empty-raw.rules
empty-security.rules)
backup=(etc/conf.d/iptables)
sha1sums=('4dc8cdf1b711b23ed88eaaaa0e0e157d2bf2d81c'
'5bb6fa526665cdd728c26f0f282f5a51f220cf88'
'2db68906b603e5268736f48c8e251f3a49da1d75'
'83b3363878e3660ce23b2ad325b53cbd6c796ecf'
'9907f9e815592837abc7fa3264a401567b7606ab'
'cdb830137192bbe002c6d01058656bd053ed0ddd'
'd9f9f06b46b4187648e860afa0552335aafe3ce4'
'c45b738b5ec4cfb11611b984c21a83b91a2d58f3'
'1694d79b3e6e9d9d543f6a6e75fed06066c9a6c6'
'7db53bb882f62f6c677cc8559cff83d8bae2ef73'
'ebbd1424a1564fd45f455a81c61ce348f0a14c2e')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
# http://bugs.archlinux.org/task/17046
sed -i '87 i libxt_RATEEST.so: libxt_RATEEST.oo' extensions/GNUmakefile.in
sed -i '88 i \\t${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -lm -shared ${LDFLAGS} -o $@ $<;\n' extensions/GNUmakefile.in
# FS#25358: libxt_statistic.so undefined symbol: lround
export LDFLAGS='-lm'
./configure --prefix=/usr \
--libexecdir=/usr/lib/iptables --sysconfdir=/etc \
--with-xtlibdir=/usr/lib/iptables \
--enable-devel --enable-libipq \
--enable-shared --enable-static
# build fails when not enabling static, see if we can remove it on next build
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
unset CFLAGS
unset LDFLAGS
make DESTDIR="${pkgdir}" install
cd "${srcdir}"
install -D -m755 iptables "${pkgdir}"/etc/rc.d/iptables
install -D -m755 ip6tables "${pkgdir}"/etc/rc.d/ip6tables
install -D -m644 empty.rules "${pkgdir}"/etc/iptables/empty.rules
install -D -m644 simple_firewall.rules "${pkgdir}"/etc/iptables/simple_firewall.rules
install -D -m644 iptables.conf.d "${pkgdir}"/etc/conf.d/iptables
mkdir -p "${pkgdir}"/var/lib/iptables
install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/iptables
}
|