updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / quagga-lisg / PKGBUILD
blob338707a19ae14fc8f2b5d1d959da9e447e11136c
2 # quagga routing suite PKGBUILD
4 # Maintainer: Xavier Devlamynck <magicrhesus@ouranos.be>
5 # Contributor: shild <shildv@gmail.com> 
6 # Contributor: Georg Grabler (STiAT) <ggrabler@gmail.com>
7 # Contributor: Bart Kos, bro at fast-stable-secure dot net
8 # Contributor: HomeCreate <homecreate@list.ru>
9 # Contributor: Damjan Georgievski, gdamjan at gmail dot com
12 pkgname=quagga-lisg
13 pkgver=0.99.20
14 pkgrel=1
15 pkgdesc="Advanced routing protocol suite. Includes BGP4 OSPF2 OSPF3 RIP protocols implementations. Version patched for use with lISG"
16 arch=('i686' 'x86_64')
17 url="http://www.quagga.net"
18 license=('GPL2')
19 depends=('libcap>=2.17' 'libnl' 'net-snmp' 'readline>=6.0.003-3' 'iproute' 'cpulimit' 'autoconf')
20 replaces=('quagga')
21 backup=('etc/quagga.d/zebra.conf' 'etc/quagga.d/ripd.conf' 'etc/quagga.d/ripngd.conf' 'etc/quagga.d/ospfd.conf' 'etc/quagga.d/ospf6d.conf' 'etc/quagga.d/bgpd.conf' 'etc/conf.d/quagga')
22 install=quagga.install
24 source=(http://www.quagga.net/download/quagga-$pkgver.tar.gz zebra ripd ripngd ospfd ospf6d bgpd quagga.conf 
25         patch-ipforward_sysctl.c.patch patch-Makefile.in.patch quagga-kernel-blackhole-add.diff)
26 md5sums=('64cc29394eb8a4e24649d19dac868f64'
27          '0bb8662ffb60106ca5476b559afe6fa9'
28          '892055cfd46b7bd89fd13cf4c446c07e'
29          '12075ca726cb8e401f601b17f375b88e'
30          '5069f9e6ade2e1acc9335da38b2be310'
31          'f44cdb3354e8bd70039cab07c3363cf4'
32          '83327d4d078a8d90b7e8e3c3f90b92e8'
33          '1fd63dc935eece30d871c7d007b1c432'
34          '76ae0de530e7ef287507f0e4b3bbe4ed'
35          'a16065f40a229e711d0a0e37340eff15'
36          'b0c15be157952f2bf05f5c6a07f249fc')
38 build() {
39     cd $srcdir/quagga-$pkgver
41   msg "Patching..."
42   # ipv6 patch
43   cat $srcdir/patch-ipforward_sysctl.c.patch | patch -p1
44   # reordering libs patch
45   cat $srcdir/patch-Makefile.in.patch | patch -p1
46   # blackhole patch
47   cat $srcdir/quagga-kernel-blackhole-add.diff | patch -p1
49   msg "Configuring..."
50   ./configure --prefix=/usr \
51                 --sysconfdir=/etc/quagga.d \
52                 --localstatedir=/var/lib/quagga \
53                 --enable-ipv6 \
54                 --enable-snmp \
55                 --enable-netlink \
56                 --enable-tcp-zebra \
57                 --enable-opaque-lsa \
58                 --enable-ospf-te \
59                 --enable-multipath=0 \
60                 --enable-user=quagga \
61                 --enable-group=quagga \
62                 --enable-irdp \
63                 --enable-pcreposix \
64                 --enable-rtadv \
65     --enable-vtysh
66     
67     msg "Building..."
68     make
70     msg "Installing..."
71     make DESTDIR=$pkgdir PREFIX=$pkgdir install
73     for line in bgpd ospfd ospf6d zebra ripd ripngd
74     do
75         install -D -m 755 -o root -g root $srcdir/$line $pkgdir/etc/rc.d/$line
76         
77           touch $pkgdir/etc/quagga.d/$line.conf
78           echo "password quagga" > $pkgdir/etc/quagga.d/$line.conf
79     done
81     mkdir -p $pkgdir/etc/conf.d
82     install -D -m 644 -o root -g root $srcdir/quagga.conf $pkgdir/etc/conf.d/quagga
84     chmod 775 $pkgdir/etc/quagga.d
85     rm $pkgdir/usr/share/info/dir
86     
87     mkdir -p $pkgdir/var/lib/quagga
88     chmod 775 $pkgdir/var/lib/quagga
89     mkdir -p $pkgdir/var/log/quagga
90     
91     rm $pkgdir/usr/lib/{libospfapiclient,libospf,libzebra}.la
94 # vim:set ts=2 sw=2 et: