From 8fbc0076a4827ddc6af92e0b9daa4c4c31450808 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 19 Jul 2013 01:10:32 -0700 Subject: Fri Jul 19 01:09:18 PDT 2013 --- community/quagga/PKGBUILD | 84 +++++++++++++++++++++++++++++++++++++++++ community/quagga/babeld.service | 16 ++++++++ community/quagga/bgpd.service | 16 ++++++++ community/quagga/isisd.service | 16 ++++++++ community/quagga/ospf6d.service | 16 ++++++++ community/quagga/ospfd.service | 16 ++++++++ community/quagga/quagga.install | 36 ++++++++++++++++++ community/quagga/ripd.service | 16 ++++++++ community/quagga/ripngd.service | 16 ++++++++ community/quagga/zebra.service | 16 ++++++++ 10 files changed, 248 insertions(+) create mode 100644 community/quagga/PKGBUILD create mode 100644 community/quagga/babeld.service create mode 100644 community/quagga/bgpd.service create mode 100644 community/quagga/isisd.service create mode 100644 community/quagga/ospf6d.service create mode 100644 community/quagga/ospfd.service create mode 100644 community/quagga/quagga.install create mode 100644 community/quagga/ripd.service create mode 100644 community/quagga/ripngd.service create mode 100644 community/quagga/zebra.service (limited to 'community/quagga') diff --git a/community/quagga/PKGBUILD b/community/quagga/PKGBUILD new file mode 100644 index 000000000..d52fc06ea --- /dev/null +++ b/community/quagga/PKGBUILD @@ -0,0 +1,84 @@ +# $Id: PKGBUILD 90540 2013-05-13 00:51:44Z seblu $ +# Maintainer: Sébastien Luttringer + +pkgname=quagga +pkgver=0.99.22.1 +pkgrel=2 +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') +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=('d9ab848661720d6da2551c7a4a19c731' + '20a8e36ad851d4e06467aeb56a84b245' + 'cc90c234aac9098c5132d653037d5269' + '67d0ada0f3000b9a86351798786c5256' + '6e2569ef339838aa41375e913a8e19ce' + '260f5fcf9b53ef201a8fb34e7ea90457' + 'b6e3549d780355914ae8edd43e15630a' + '72dd63c49fdaea41729a4318d0fbac79' + '577f1e7caeea31d910f2dc29c28ada7d') + +prepare() { + cd $pkgname-$pkgver + shopt -s nullglob + for _p in "$srcdir"/*.patch; do + msg2 "Applying ${_p##*/}" + patch -p 1 -i "$_p" + done +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --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: diff --git a/community/quagga/babeld.service b/community/quagga/babeld.service new file mode 100644 index 000000000..7279f0336 --- /dev/null +++ b/community/quagga/babeld.service @@ -0,0 +1,16 @@ +[Unit] +Description=Babel routing daemon +Documentation=man:zebra(8) +BindTo=zebra.service +After=network.target zebra.service +ConditionPathExists=/etc/quagga/babeld.conf + +[Service] +Type=forking +PIDFile=/run/quagga/babeld.pid +ExecStart=/usr/bin/babeld -d +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/community/quagga/bgpd.service b/community/quagga/bgpd.service new file mode 100644 index 000000000..b0bf1db0f --- /dev/null +++ b/community/quagga/bgpd.service @@ -0,0 +1,16 @@ +[Unit] +Description=BGP routing daemon +Documentation=man:bgpd(8) man:zebra(8) +BindTo=zebra.service +After=network.target zebra.service +ConditionPathExists=/etc/quagga/bgpd.conf + +[Service] +Type=forking +PIDFile=/run/quagga/bgpd.pid +ExecStart=/usr/bin/bgpd -d +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/community/quagga/isisd.service b/community/quagga/isisd.service new file mode 100644 index 000000000..5ad16c1a4 --- /dev/null +++ b/community/quagga/isisd.service @@ -0,0 +1,16 @@ +[Unit] +Description=IS-IS routing daemon +Documentation=man:isis(8) man:zebra(8) +BindTo=zebra.service +After=network.target zebra.service +ConditionPathExists=/etc/quagga/isisd.conf + +[Service] +Type=forking +PIDFile=/run/quagga/isisd.pid +ExecStart=/usr/bin/isisd -d +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/community/quagga/ospf6d.service b/community/quagga/ospf6d.service new file mode 100644 index 000000000..dae3dc322 --- /dev/null +++ b/community/quagga/ospf6d.service @@ -0,0 +1,16 @@ +[Unit] +Description=OSPF routing daemon for IPv6 +Documentation=man:ospfd(8) man:zebra(8) +BindTo=zebra.service +After=network.target zebra.service +ConditionPathExists=/etc/quagga/ospf6d.conf + +[Service] +Type=forking +PIDFile=/run/quagga/ospf6d.pid +ExecStart=/usr/bin/ospf6d -d +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/community/quagga/ospfd.service b/community/quagga/ospfd.service new file mode 100644 index 000000000..e43c474cc --- /dev/null +++ b/community/quagga/ospfd.service @@ -0,0 +1,16 @@ +[Unit] +Description=OSPF routing daemon +Documentation=man:ospfd(8) man:zebra(8) +BindTo=zebra.service +After=network.target zebra.service +ConditionPathExists=/etc/quagga/ospfd.conf + +[Service] +Type=forking +PIDFile=/run/quagga/ospfd.pid +ExecStart=/usr/bin/ospfd -d +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/community/quagga/quagga.install b/community/quagga/quagga.install new file mode 100644 index 000000000..c5d88b976 --- /dev/null +++ b/community/quagga/quagga.install @@ -0,0 +1,36 @@ +infodir=/usr/share/info +filelist=(quagga.info quagga.info-1 quagga.info-2) + +post_install() { + groupadd -r quagga + useradd -MNr -s /bin/false -d /run/quagga -g quagga quagga && passwd -l quagga &>/dev/null + install -d -m 750 -o quagga -g quagga /{run,etc,var/log}/quagga + post_upgrade +} + +post_upgrade() { + if [[ -x /usr/bin/install-info ]]; then + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done + fi +} + +pre_remove() { + for d in zebra ripd ripngd bgpd ospfd ospf6d isisd; do + /etc/rc.d/$d stop &>/dev/null + done + if [[ -x /usr/bin/install-info ]]; then + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done + fi +} + +post_remove() { + userdel quagga &>/dev/null + groupdel quagga &>/dev/null + rmdir /{etc,var/log}/quagga +} + +# vim: ft=sh ts=2 sw=2 et: diff --git a/community/quagga/ripd.service b/community/quagga/ripd.service new file mode 100644 index 000000000..a55498100 --- /dev/null +++ b/community/quagga/ripd.service @@ -0,0 +1,16 @@ +[Unit] +Description=RIP routing daemon +Documentation=man:ripd(8) man:zebra(8) +BindTo=zebra.service +After=network.target zebra.service +ConditionPathExists=/etc/quagga/ripd.conf + +[Service] +Type=forking +PIDFile=/run/quagga/ripd.pid +ExecStart=/usr/bin/ripd -d +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/community/quagga/ripngd.service b/community/quagga/ripngd.service new file mode 100644 index 000000000..4990669d2 --- /dev/null +++ b/community/quagga/ripngd.service @@ -0,0 +1,16 @@ +[Unit] +Description=RIP routing daemon for IPv6 +Documentation=man:ripngd(8) man:zebra(8) +BindTo=zebra.service +After=network.target zebra.service +ConditionPathExists=/etc/quagga/ripngd.conf + +[Service] +Type=forking +PIDFile=/run/quagga/ripngd.pid +ExecStart=/usr/bin/ripngd -d +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/community/quagga/zebra.service b/community/quagga/zebra.service new file mode 100644 index 000000000..02813c37c --- /dev/null +++ b/community/quagga/zebra.service @@ -0,0 +1,16 @@ +[Unit] +Description=GNU Zebra routing manager +Documentation=man:zebra(8) +After=network.target +ConditionPathExists=/etc/quagga/zebra.conf + +[Service] +Type=forking +PIDFile=/run/quagga/zebra.pid +ExecStartPre=/sbin/ip route flush proto zebra +ExecStart=/usr/bin/zebra -d +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3-54-g00ecf