summaryrefslogtreecommitdiff
path: root/community/quagga/PKGBUILD
blob: 0e4ead5f65efb60db9b9305e3fe582126fe010e3 (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: PKGBUILD 70110 2012-04-29 20:23:17Z seblu $
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>

pkgname=quagga
pkgver=0.99.20.1
pkgrel=1
pkgdesc='BGP/OSPF/ISIS/RIP/RIPNG routing daemon suite'
arch=('i686' 'x86_64')
url='http://www.quagga.net'
license=('GPL2')
depends=('libcap' 'net-snmp' 'readline' 'ncurses')
options=('!libtool' '!buildflags')
backup=()
install=quagga.install
source=("http://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.gz"
        'quagga.rc'
        'quagga.conf')
md5sums=('270ddd464407f8ce6fa8ada8bc1abbd7'
         '71d474228a1e02d698cd24e9fd55ca38'
         '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: