1 # Maintainer: Valere Monseur <valere_monseur@hotmail.com>
2 # Contributor: Phillip Smith <fukawi2@NO-SPAM.gmail.com>
3 # Contributor: (asper, noob
9 pkgdesc="A powerful firewall manager built on top of iptables"
10 arch=('i686' 'x86_64')
11 url="http://www.vuurmuur.org"
14 optdepends=('conntrack-tools: for connection tracking'
15 'iproute2: for traffic shapping'
16 'iptrafvol: for traffic volume logging')
17 backup=('etc/vuurmuur/config.conf'
18 'etc/vuurmuur/modules.conf'
19 'etc/vuurmuur/vuurmuur_conf.conf'
20 'etc/vuurmuur/plugins/textdir.conf'
21 'etc/logrotate.d/vuurmuur')
22 source=(http://downloads.sourceforge.net/${pkgname}/${_pkgname}-${pkgver}.tar.gz \
26 install=vuurmuur.install
27 md5sums=('bad91aafcbea5e3a434440f88d722778'
28 '3b873578a13bcfc27b22d085f42560a2'
29 '20675e323030d71e740706e8096033d3'
30 '8a9526896b8043bfc08f22b2b4c9b7e2')
34 cd ${srcdir}/${_pkgname}-${pkgver} || return 1
35 for TARBALL in lib${pkgname}-${pkgver}.tar.gz ${pkgname}-${pkgver}.tar.gz ${pkgname}_conf-${pkgver}.tar.gz ; do
36 tar xzf $TARBALL || return 1
39 # build vuurmuur library
40 cd ${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver} || return 1
41 ./configure --prefix=/usr --sysconfdir=/etc || return 1
43 make DESTDIR=${pkgdir} install || return 1
46 cd ${srcdir}/${_pkgname}-${pkgver}/${pkgname}-${pkgver} || return 1
47 sed -i -e 's|-rpath|-rpath-link|' configure || return 1
51 --with-libvuurmuur-includes="${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src" \
52 --with-libvuurmuur-libraries="${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src" \
54 LDFLAGS="-L${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src \
55 -L${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src/.libs \
56 -Wl,-rpath=/usr/lib/${pkgname}/plugins" || return 1
58 make DESTDIR=${pkgdir} install || return 1
61 cd ${srcdir}/${_pkgname}-${pkgver}/${pkgname}_conf-${pkgver} || return 1
62 sed -i -e 's|-rpath|-rpath-link|' configure || return 1
66 --with-libvuurmuur-includes="${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src" \
67 --with-libvuurmuur-libraries="${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src" \
69 LDFLAGS="-L${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src \
70 -L${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src/.libs \
71 -Wl,-rpath=/usr/lib/${pkgname}/plugins" || return 1
73 make DESTDIR=${pkgdir} install || return 1
75 # install configuration
76 install -d -m700 ${pkgdir}/etc/${pkgname} || return 1
77 install -D -m600 ${srcdir}/config.conf ${pkgdir}/etc/${pkgname}/config.conf || return 1
78 install -D -m600 ${srcdir}/modules.conf ${pkgdir}/etc/${pkgname}/modules.conf || return 1
79 install -D -m600 ${srcdir}/${_pkgname}-${pkgver}/${pkgname}_conf-${pkgver}/config/${pkgname}_conf.conf.sample \
80 ${pkgdir}/etc/${pkgname}/${pkgname}_conf.conf || return 1
82 sed -i -e 's|/usr/bin/iptrafvol.pl|/usr/sbin/iptrafvol.pl|' \
83 ${pkgdir}/etc/${pkgname}/${pkgname}_conf.conf || return 1
85 install -d -m700 ${pkgdir}/etc/${pkgname}/plugins || return 1
86 echo "LOCATION=\"/etc/${pkgname}/textdir\"" > ${pkgdir}/etc/${pkgname}/plugins/textdir.conf || return 1
88 install -D -m644 ${pkgdir}/usr/share/${pkgname}/scripts/${pkgname}-logrotate ${pkgdir}/etc/logrotate.d/${pkgname} || return 1
90 # default firewall setup in /usr/share
91 install -d ${pkgdir}/usr/share/${pkgname}/textdir/{interfaces,services,zones,rules} || return 1
93 touch ${pkgdir}/usr/share/${pkgname}/textdir/rules/rules.conf || return 1
94 touch ${pkgdir}/usr/share/${pkgname}/textdir/rules/blocklist.conf || return 1
96 cp -R ${srcdir}/${_pkgname}-${pkgver}/zones/* ${pkgdir}/usr/share/${pkgname}/textdir/zones/ || return 1
97 cp -R ${pkgdir}/usr/share/${pkgname}/services/* ${pkgdir}/usr/share/${pkgname}/textdir/services/ || return 1
99 # install daemon, log and doc
100 install -D -m755 ${srcdir}/rc.${pkgname} ${pkgdir}/etc/rc.d/${pkgname} || return 1
101 install -d -m700 ${pkgdir}/var/log/${pkgname} || return 1
103 for FILE in ${pkgdir}/usr/share/${pkgname}/help/*.hlp
105 mv ${FILE} ${FILE}.iso8859 || return 1
106 iconv -f ISO-8859-1 -t UTF-8 ${FILE}.iso8859 > ${FILE} || return 1
110 install -D -m644 ${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/COPYING \
111 ${pkgdir}/usr/share/licenses/lib${pkgname}/COPYING || return 1
113 install -D -m644 ${srcdir}/${_pkgname}-${pkgver}/${pkgname}-${pkgver}/COPYING \
114 ${pkgdir}/usr/share/licenses/${pkgname}/COPYING || return 1
116 install -D -m644 ${srcdir}/${_pkgname}-${pkgver}/${pkgname}_conf-${pkgver}/COPYING \
117 ${pkgdir}/usr/share/licenses/${pkgname}_conf/COPYING || return 1
119 # remove useless stuffs
120 rm -rf ${pkgdir}/usr/share/doc || return 1
121 rm -rf ${pkgdir}/usr/share/${pkgname}/services || return 1
122 rm -f ${pkgdir}/usr/share/${pkgname}/help/vuurmuur-ru.UTF-8.hlp || return 1