summaryrefslogtreecommitdiff
path: root/community/radvd
diff options
context:
space:
mode:
Diffstat (limited to 'community/radvd')
-rw-r--r--community/radvd/PKGBUILD48
-rw-r--r--community/radvd/radvd.conf3
-rw-r--r--community/radvd/radvd.rc34
-rw-r--r--community/radvd/radvd.service8
4 files changed, 74 insertions, 19 deletions
diff --git a/community/radvd/PKGBUILD b/community/radvd/PKGBUILD
index afe2ca3ec..a8aaa6d61 100644
--- a/community/radvd/PKGBUILD
+++ b/community/radvd/PKGBUILD
@@ -1,38 +1,48 @@
-# $Id: PKGBUILD 66535 2012-02-25 23:57:00Z lfleischer $
-# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
+# $Id: PKGBUILD 66970 2012-03-03 00:47:31Z seblu $
+# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
+# Contributor: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: Mark Smith <markzzzsmith@yahoo.com.au>
pkgname=radvd
-pkgver=1.8.2
-pkgrel=2
-pkgdesc='IPv6 Router Advertisement / Router Solicitation daemon'
+pkgver=1.8.5
+pkgrel=1
+pkgdesc='IPv6 Router Advertisement Daemon'
url='http://www.litech.org/radvd/'
license=('custom')
depends=('glibc')
arch=('i686' 'x86_64' 'mips64el')
-install=radvd.install
-source=("http://www.litech.org/radvd/dist/$pkgname-$pkgver.tar.gz" 'radvd.rc.d')
-md5sums=('ac8a862d2b232d25ea2622274a2da8a4'
- '65a585f5850a1ac2a0c2c2a7096ec92a')
+backup=('etc/radvd.conf' 'etc/conf.d/radvd')
+source=("http://www.litech.org/radvd/dist/$pkgname-$pkgver.tar.gz"
+ "$pkgname.rc"
+ "$pkgname.conf"
+ "$pkgname.service")
+sha1sums=('344c145bd29938b7eefb0210cf92bf18df3e191d'
+ '7b187db1f0ba2897cc07ea14233c079593b69ef0'
+ 'd7755ac7e752452e5ac92d2bfd970db00525902d'
+ 'd95dc4d650a086641d62bf42806669e0a407d1df')
build() {
cd ${pkgname}-${pkgver}
-
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
+ ./configure --prefix=/usr --sysconfdir=/etc --with-pidfile=/run/radvd.pid \
--mandir=/usr/share/man
-
make
}
package() {
cd ${pkgname}-${pkgver}
+ make DESTDIR="$pkgdir" install
- make DESTDIR=$pkgdir install
+ # install default config
+ install -D -m 644 radvd.conf.example "$pkgdir/etc/radvd.conf"
- install -Dm644 radvd.conf.example \
- $pkgdir/usr/share/doc/radvd/radvd.conf.example
- install -Dm644 COPYRIGHT \
- $pkgdir/usr/share/licenses/$pkgname/COPYRIGHT
- install -Dm755 $srcdir/radvd.rc.d $pkgdir/etc/rc.d/radvd
+ # install license
+ install -D -m 644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/COPYRIGHT"
+
+ # install initscripts & systemd files
+ install -D -m 755 ../$pkgname.rc "$pkgdir/etc/rc.d/$pkgname"
+ install -D -m 644 ../$pkgname.conf "$pkgdir/etc/conf.d/$pkgname"
+ install -D -m 644 ../$pkgname.service \
+ "$pkgdir/lib/systemd/system/$pkgname.service"
}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community/radvd/radvd.conf b/community/radvd/radvd.conf
new file mode 100644
index 000000000..26cd410d1
--- /dev/null
+++ b/community/radvd/radvd.conf
@@ -0,0 +1,3 @@
+# vim:set ts=2 sw=2 ft=sh noet:
+
+DAEMON_OPTS='--logmethod syslog'
diff --git a/community/radvd/radvd.rc b/community/radvd/radvd.rc
new file mode 100644
index 000000000..b5dc6e27b
--- /dev/null
+++ b/community/radvd/radvd.rc
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/${0##*/}
+
+NAME='IPv6 Router Advertisement Daemon'
+DAEMON=/usr/sbin/radvd
+PID=$(pidof -o %PPID $DAEMON)
+
+case "$1" in
+ start)
+ stat_busy "Starting $NAME daemon"
+ [[ ! $PID ]] && $DAEMON $DAEMON_OPTS && add_daemon $NAME && stat_done && exit 0
+ stat_fail
+ ;;
+ stop)
+ stat_busy "Stopping $NAME daemon"
+ [[ $PID ]] && kill $PID &> /dev/null && rm_daemon $NAME && stat_done && exit 0
+ stat_fail
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ exit 0
+ ;;
+ *)
+ echo "usage: ${0##*/} {start|stop|restart}" >&2
+ ;;
+esac
+
+exit 1
+
+# vim:set ts=2 sw=2 ft=sh noet:
diff --git a/community/radvd/radvd.service b/community/radvd/radvd.service
new file mode 100644
index 000000000..47a5f7f67
--- /dev/null
+++ b/community/radvd/radvd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=IPv6 Router Advertisement Daemon
+
+[Service]
+ExecStart=/usr/sbin/radvd --nodaemon --logmethod stderr
+
+[Install]
+WantedBy=multi-user.target