blob: b976cc754f4e98da448c9e891da21fb168717865 (
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
77
78
79
80
|
# $Id: PKGBUILD 84732 2013-02-23 20:56:41Z seblu $
# Maintainer: Sébastien Luttringer
pkgname=quagga
pkgver=0.99.22
pkgrel=1
pkgdesc='BGP/OSPF/ISIS/RIP/RIPNG routing daemon suite'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.quagga.net'
license=('GPL2')
depends=('libcap' 'net-snmp' 'readline' 'ncurses')
options=('!libtool' '!buildflags')
install=quagga.install
source=("http://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.gz"
'babeld.service'
'bgpd.service'
'isisd.service'
'ospf6d.service'
'ospfd.service'
'ripd.service'
'ripngd.service'
'zebra.service')
md5sums=('3057bf3a91116a1017dd0df7e5e8ef93'
'45d8bf56a426b0e7ebe429547be8a27a'
'ab31ed8dafd7a92137f4f00ad0937b4f'
'4c05d0105cd0db23a2583bd75a1bde4d'
'd087dce5eeba78ac64541157c7e04dfd'
'c5f8a729685cebf8fc5b1a1552d37b6d'
'e721b334bb0b31983642b307033c63d0'
'effeb26ff78ffcafe7808596ddc5d3fc'
'f0c0b99346b2c373a74158e45f04cf91')
build() {
cd $pkgname-$pkgver
shopt -s nullglob
for _p in "$srcdir"/*.patch; do
msg2 "Applying ${_p##*/}"
patch -p 1 -i "$_p"
done
./configure \
--prefix=/usr \
--sysconfdir=/etc/quagga \
--localstatedir=/run/quagga \
--enable-exampledir=/usr/share/doc/quagga/examples \
--enable-vtysh \
--enable-isisd \
--enable-isis-topology \
--enable-netlink \
--enable-snmp \
--enable-tcp-zebra \
--enable-irdp \
--enable-pcreposix \
--enable-multipath=64 \
--enable-user=quagga \
--enable-group=quagga \
--enable-configfile-mask=0640 \
--enable-logfile-mask=0640
make
}
package() {
# upstream install
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
# logrotate stuff
install -D -m 644 redhat/$pkgname.logrotate "$pkgdir/etc/logrotate.d/$pkgname"
sed -ri 's,/var/run/quagga,/run/quagga,g' "$pkgdir/etc/logrotate.d/$pkgname"
# systemd
cd "$srcdir"
for _d in zebra ripd ripngd bgpd ospfd ospf6d isisd babeld; do
install -D -m 644 $_d.service "$pkgdir/usr/lib/systemd/system/$_d.service"
done
install -D -m 644 /dev/null "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
echo "d /run/$pkgname 0750 $pkgname $pkgname" > "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}
# vim:set ts=2 sw=2 et:
|