aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-02-03 15:21:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-02-03 15:21:05 +0000
commit23274e33795e35e449a7642cc2b731e23b0b27a2 (patch)
tree1c58691304f3bb84ea491228f8dd3c13eda72811
parentaf54c8328cf06556611abc4b4608871e07f99541 (diff)
extra/opennhrp: new aport
NBMA Next Hop Resolution Protocol daemon http://sourceforge.net/projects/opennhrp
-rw-r--r--extra/opennhrp/APKBUILD29
-rw-r--r--extra/opennhrp/opennhrp-0.9.2-cflags.patch15
-rw-r--r--extra/opennhrp/opennhrp-0.9.2-fix-false-assert.patch13
-rw-r--r--extra/opennhrp/opennhrp.confd2
-rwxr-xr-xextra/opennhrp/opennhrp.initd32
5 files changed, 91 insertions, 0 deletions
diff --git a/extra/opennhrp/APKBUILD b/extra/opennhrp/APKBUILD
new file mode 100644
index 00000000000..70534ef0ff9
--- /dev/null
+++ b/extra/opennhrp/APKBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=opennhrp
+pkgver=0.9.2
+pkgrel=0
+pkgdesc="NBMA Next Hop Resolution Protocol daemon"
+url="http://sourceforge.net/projects/opennhrp"
+license="GPL-3"
+depends="uclibc"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
+ $pkgname-$pkgver-cflags.patch
+ $pkgname-$pkgver-fix-false-assert.patch
+ $pkgname.initd
+ $pkgname.confd
+ "
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ for i in ../*.patch; do
+ msg "Applying $i"
+ patch -p1 < $i || return 1
+ done
+
+ make || return 1
+ make DESTDIR="$pkgdir" install
+ install -Dm755 "$srcdir"/opennhrp.initd "$pkgdir"/etc/init.d/opennhrp
+ install -Dm644 "$srcdir"/opennhrp.confd "$pkgdir"/etc/cond.d/opennhrp
+}
+md5sums="71a017151292461aaee572c908ac9ac7 opennhrp-0.9.2.tar.bz2"
diff --git a/extra/opennhrp/opennhrp-0.9.2-cflags.patch b/extra/opennhrp/opennhrp-0.9.2-cflags.patch
new file mode 100644
index 00000000000..9eeeb66a220
--- /dev/null
+++ b/extra/opennhrp/opennhrp-0.9.2-cflags.patch
@@ -0,0 +1,15 @@
+--- opennhrp-0.9.2/Makefile.orig Tue Feb 3 14:51:18 2009
++++ opennhrp-0.9.2/Makefile Tue Feb 3 14:51:07 2009
+@@ -22,9 +22,9 @@
+ INSTALL=install
+ INSTALLDIR=$(INSTALL) -d
+
+-CFLAGS=-Werror -Wall -Wstrict-prototypes -std=gnu99 -O2 \
+- -DOPENNHRP_VERSION=\"$(FULL_VERSION)\"
+-LDFLAGS=
++CFLAGS?=-Werror -Wall -Wstrict-prototypes -O2
++CFLAGS+=-std=gnu99 -DOPENNHRP_VERSION=\"$(FULL_VERSION)\"
++LDFLAGS?=
+
+ DESTDIR=
+ SBINDIR=/usr/sbin
diff --git a/extra/opennhrp/opennhrp-0.9.2-fix-false-assert.patch b/extra/opennhrp/opennhrp-0.9.2-fix-false-assert.patch
new file mode 100644
index 00000000000..67b44ab5d21
--- /dev/null
+++ b/extra/opennhrp/opennhrp-0.9.2-fix-false-assert.patch
@@ -0,0 +1,13 @@
+diff -ru opennhrp-0.9.2.orig/nhrp/nhrp_peer.c opennhrp-0.9.2/nhrp/nhrp_peer.c
+--- opennhrp-0.9.2.orig/nhrp/nhrp_peer.c 2009-02-02 13:12:46 +0000
++++ opennhrp-0.9.2/nhrp/nhrp_peer.c 2009-02-02 13:36:51 +0000
+@@ -1260,7 +1260,8 @@
+ {
+ char tmp[NHRP_PEER_FORMAT_LEN];
+
+- NHRP_BUG_ON(peer->flags & NHRP_PEER_FLAG_REMOVED);
++ if (peer->flags & NHRP_PEER_FLAG_REMOVED)
++ return;
+
+ nhrp_debug("Removing %s %s",
+ nhrp_peer_type[peer->type],
diff --git a/extra/opennhrp/opennhrp.confd b/extra/opennhrp/opennhrp.confd
new file mode 100644
index 00000000000..c3bece169e6
--- /dev/null
+++ b/extra/opennhrp/opennhrp.confd
@@ -0,0 +1,2 @@
+# Uncomment the row below to enable verbose logging.
+#OPENNHRP_OPTS=-v
diff --git a/extra/opennhrp/opennhrp.initd b/extra/opennhrp/opennhrp.initd
new file mode 100755
index 00000000000..ac7ea6a572e
--- /dev/null
+++ b/extra/opennhrp/opennhrp.initd
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.rc7,v 1.1 2006/11/26 21:37:22 cedk Exp $
+
+PIDFILE=/var/run/opennhrp.pid
+
+depend() {
+ use logger
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/opennhrp/opennhrp.conf ] ; then
+ eerror "You need an /etc/opennhrp/opennhrp.conf config file to run opennhrp"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting opennhrp"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --exec /usr/sbin/opennhrp -- -d -p $PIDFILE 2> /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping opennhrp"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ eend $?
+}