diff options
author | shtrom | 2010-02-19 00:51:09 +0000 |
---|---|---|
committer | shtrom | 2010-02-19 00:51:09 +0000 |
commit | da7073258d407380bdb9dbaa29165108373ac203 (patch) | |
tree | 84b76bbf8a15a27a455e65a3d652673f5d2c9c7a | |
download | aur-da7073258d407380bdb9dbaa29165108373ac203.tar.gz |
[mip6d-umip.org-git] UMIP package based on source from [0].
[0] http://www.umip.org
git-svn-id: svn+ssh://scm.narf.ssji.net/svn/archlinux-packages@230 df209809-8e4a-0410-9a64-c169741eb0fc
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 53 | ||||
-rw-r--r-- | mip6d.confd | 5 | ||||
-rw-r--r-- | mip6d.init | 68 |
4 files changed, 148 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..27497a1a66d2 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = mip6d-umip.org-git + pkgdesc = UMIP userland with NEPL and MCoA patches for Mobile IPv6/NEMO operation with multihoming + pkgver = 20100219 + pkgrel = 1 + url = http://www.umip.org + arch = i686 + arch = x86_64 + license = GPL + license = custom + makedepends = indent + depends = kernel26-mipl + optdepends = radvd: to act as a NEMO Mobile Router advertising a MNP on the mobile link + provides = mip6d + backup = etc/mip6d/mip6d.conf + backup = etc/conf.d/mip6d.conf + source = mip6d.init + source = mip6d.confd + md5sums = 6995ae716fc0f66040ee528c291f08df + md5sums = efbe23915c7dcf018ce70bcf72d18be7 + +pkgname = mip6d-umip.org-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e2186a813dbc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,53 @@ +# $Id$ +# Contributor: Olivier Mehani <shtrom-aur@ssji.net> +pkgname=mip6d-umip.org-git +_umipname=mipv6-daemon-umip +pkgver=20100219 +pkgrel=1 +pkgdesc="UMIP userland with NEPL and MCoA patches for Mobile IPv6/NEMO operation with multihoming" +arch=(i686 x86_64) +url="http://www.umip.org" +license=('GPL' 'custom') +depends=('kernel26-mipl') +makedepends=(indent) +provides=(mip6d) +optdepends=('radvd: to act as a NEMO Mobile Router advertising a MNP on the mobile link') +backup=(etc/mip6d/mip6d.conf etc/conf.d/mip6d.conf) +source=(mip6d.init + mip6d.confd) +md5sums=('6995ae716fc0f66040ee528c291f08df' + 'efbe23915c7dcf018ce70bcf72d18be7') + +_gitroot="http://umip.org/git/umip.git/" +_gitname="umip" + +build() { + cd "$srcdir" + msg "Connecting to GIT server...." + + if [ -d "${srcdir}/${_gitname}" ] ; then + cd ${_gitname} && git pull --rebase + else + git clone ${_gitroot} + cd ${_gitname} + fi + + + autoreconf -i + ./configure --prefix=/usr --enable-vt + make CFLAGS=-DNULL=0 || return 1 + make DESTDIR="$pkgdir/" install + + for file in extras/example-*.conf; do + install -D -m 0644 $file $pkgdir/etc/mip6d/${file/extras\/example/mip6d} + done + install -m 0644 $pkgdir/etc/mip6d/mip6d-mn.conf $pkgdir/etc/mip6d/mip6d.conf + + install -D -m 0755 $srcdir/mip6d.init $pkgdir/etc/rc.d/mip6d + install -D -m 0644 $srcdir/mip6d.confd $pkgdir/etc/conf.d/mip6d.conf + + install -d $pkgdir/usr/share/licenses/${pkgname} + install -m 0644 COPYING* licenses/*.txt $pkgdir/usr/share/licenses/${pkgname} +} + +# vim:set ts=2 sw=2 et: diff --git a/mip6d.confd b/mip6d.confd new file mode 100644 index 000000000000..8b196908459c --- /dev/null +++ b/mip6d.confd @@ -0,0 +1,5 @@ +# If >0, mip6d doesn't detach from the terminal +DEBUG_LEVEL=0 + +# Default location of configuration file +MIP6D_ARGS="-c /etc/mip6d/mip6d.conf" diff --git a/mip6d.init b/mip6d.init new file mode 100644 index 000000000000..7c62f6e55a8d --- /dev/null +++ b/mip6d.init @@ -0,0 +1,68 @@ +#!/bin/bash + +daemon_name=mip6d + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/$daemon_name.conf + +get_pid() { + pidof -o %PPID $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name daemon" + + PID=$(get_pid) + if [ -z "$PID" ]; then + [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid + # RUN + $daemon_name -d $DEBUG_LEVEL $MIP6D_ARGS + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo $(get_pid) > /var/run/$daemon_name.pid + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + # KILL + [ ! -z "$PID" ] && kill $PID &> /dev/null + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f /var/run/$daemon_name.pid &> /dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + sleep 3 + $0 start + ;; + + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + + *) + echo "usage: $0 {start|stop|restart|status}" +esac + +exit 0 |