summaryrefslogtreecommitdiff
path: root/community/quagga/PKGBUILD
blob: 2b9f4ec710dceaf094d69f19edac8687be99a37f (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
# $Id$
# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net>

pkgname=quagga
pkgver=0.99.20
pkgrel=1
pkgdesc='BGP/OSPF/ISIS/RIP/RIPNG routing daemon suite'
arch=('i686' 'x86_64')
url='http://www.quagga.net'
license=('GPL2')
depends=('libcap' 'libnl' 'net-snmp' 'readline' 'ncurses')
options=('!libtool' '!buildflags')
backup=()
install=quagga.install
source=("http://www.quagga.net/download/$pkgname-$pkgver.tar.gz"
        'quagga.rc'
        'quagga.conf')
md5sums=('64cc29394eb8a4e24649d19dac868f64'
         '6ebd2be39c45361eabe3e278bb21efa0'
         '0c4f2dd13c7dac1b73de923d1d5e4e17')

build() {
  cd $pkgname-$pkgver
  ./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=nobody \
    --enable-group=nobody \
    --enable-configfile-mask=0640 \
    --enable-logfile-mask=0640
  make
}

package() {
  # initscripts files
  for d in zebra ripd ripngd bgpd ospfd ospf6d isisd; do
    install -D -m 755 $pkgname.rc "$pkgdir/etc/rc.d/$d"
    install -D -m 644 $pkgname.conf "$pkgdir/etc/conf.d/$d"
    backup+=("etc/conf.d/$d")
  done

  # create /run/quagga directory at startup
  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"

  # soft
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 ft=sh et: