summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-07-01 11:27:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-07-01 11:27:11 +0000
commit445ca2557114b18482ed1f9b63521e6be7dc073a (patch)
treeea2d443b9782a6e09ca858c00b5c409211d18087 /testing
parent9231365da35bfe61172dcea6eb416866f12712bd (diff)
downloadaports-445ca2557114b18482ed1f9b63521e6be7dc073a.tar.bz2
aports-445ca2557114b18482ed1f9b63521e6be7dc073a.tar.xz
testing/rpcbind: new aport
portmap replacement which supports RPC over various protocols http://rpcbind.sourceforge.net
Diffstat (limited to 'testing')
-rw-r--r--testing/rpcbind/0001-uclibc-nss.patch28
-rw-r--r--testing/rpcbind/0002-uclibc-rpcsvc-defines.patch58
-rw-r--r--testing/rpcbind/APKBUILD42
-rw-r--r--testing/rpcbind/rpcbind.confd4
-rw-r--r--testing/rpcbind/rpcbind.initd25
5 files changed, 157 insertions, 0 deletions
diff --git a/testing/rpcbind/0001-uclibc-nss.patch b/testing/rpcbind/0001-uclibc-nss.patch
new file mode 100644
index 000000000..3685c03b6
--- /dev/null
+++ b/testing/rpcbind/0001-uclibc-nss.patch
@@ -0,0 +1,28 @@
+From b8f0d7b7318ba344c25785d6f5cf3f8de98012d4 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 2 Feb 2010 09:36:03 +0000
+Subject: [PATCH 1/2] uclibc-nss
+
+---
+ src/rpcbind.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/src/rpcbind.c b/src/rpcbind.c
+index 525ffba..1fe1a60 100644
+--- a/src/rpcbind.c
++++ b/src/rpcbind.c
+@@ -67,7 +67,11 @@
+ #include <pwd.h>
+ #include <string.h>
+ #include <errno.h>
++#if defined(__UCLIBC__)
++#define __nss_configure_lookup(x,y)
++#else
+ #include <nss.h>
++#endif
+ #include "config.h"
+ #include "rpcbind.h"
+
+--
+1.6.6.1
+
diff --git a/testing/rpcbind/0002-uclibc-rpcsvc-defines.patch b/testing/rpcbind/0002-uclibc-rpcsvc-defines.patch
new file mode 100644
index 000000000..e394966f5
--- /dev/null
+++ b/testing/rpcbind/0002-uclibc-rpcsvc-defines.patch
@@ -0,0 +1,58 @@
+From 077add040c2e30d3ac507362f4afe350f47be027 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 2 Feb 2010 09:47:57 +0000
+Subject: [PATCH 2/2] uclibc-rpcsvc-defines
+
+---
+ src/security.c | 28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+diff --git a/src/security.c b/src/security.c
+index 0edeac6..e9fed55 100644
+--- a/src/security.c
++++ b/src/security.c
+@@ -20,6 +20,32 @@
+ /*
+ * XXX for special case checks in check_callit.
+ */
++#if defined(__UCLIBC__)
++
++#define MOUNTPROC_MNT 1
++#define MOUNTPROC_UMNT 3
++
++#define NFS_PROGRAM 100003
++#define YPPROG 100004
++#define MOUNTPROG 100005
++#define YPBINDPROG 100007
++#define YPPASSWDPROG 100009
++#define RQUOTAPROG 100011
++
++#define YPPROC_NULL 0
++#define YPPROC_DOMAIN 1
++#define YPPROC_DOMAIN_NONACK 2
++#define YPPROC_MATCH 3
++#define YPPROC_FIRST 4
++#define YPPROC_NEXT 5
++#define YPPROC_XFR 6
++#define YPPROC_CLEAR 7
++#define YPPROC_ALL 8
++
++#define YPBINDPROC_SETDOM 2
++
++#else
++
+ #include <rpcsvc/mount.h>
+ #include <rpcsvc/rquota.h>
+ #include <rpcsvc/nfs_prot.h>
+@@ -27,6 +53,8 @@
+ #include <rpcsvc/ypclnt.h>
+ #include <rpcsvc/yppasswd.h>
+
++#endif
++
+ #include "rpcbind.h"
+
+ #ifdef LIBWRAP
+--
+1.6.6.1
+
diff --git a/testing/rpcbind/APKBUILD b/testing/rpcbind/APKBUILD
new file mode 100644
index 000000000..3574ffece
--- /dev/null
+++ b/testing/rpcbind/APKBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=rpcbind
+pkgver=0.2.0
+pkgrel=0
+pkgdesc="portmap replacement which supports RPC over various protocols"
+url="http://rpcbind.sourceforge.net"
+license="custom"
+depends=
+makedepends="libtirpc-dev"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
+ 0001-uclibc-nss.patch
+ 0002-uclibc-rpcsvc-defines.patch
+ rpcbind.initd
+ rpcbind.confd"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in "$srcdir"/*.patch; do
+ patch -p1 -i "$i" || return 1
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr --bindir=/sbin
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -Dm755 "$srcdir"/rpcbind.initd "$pkgdir"/etc/init.d/rpcbind
+ install -Dm644 "$srcdir"/rpcbind.confd "$pkgdir"/etc/conf.d/rpcbind
+ install -D -m644 COPYING "$pkgdir"/usr/share/licenses/rpcbind/COPYING
+}
+md5sums="1a77ddb1aaea8099ab19c351eeb26316 rpcbind-0.2.0.tar.bz2
+6d9718d8bdab633ef7cf83225aaed367 0001-uclibc-nss.patch
+944234c5ef6902d25bd6dfc95f979ed6 0002-uclibc-rpcsvc-defines.patch
+381a2722c69b4597af532381f1ffeae0 rpcbind.initd
+1ad5c8dcf432c8f23ba740f4c32a7c60 rpcbind.confd"
diff --git a/testing/rpcbind/rpcbind.confd b/testing/rpcbind/rpcbind.confd
new file mode 100644
index 000000000..ddc09172d
--- /dev/null
+++ b/testing/rpcbind/rpcbind.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/rpcbind
+
+# Options for `rpcbind`.
+#RPCBIND_OPTS="-l"
diff --git a/testing/rpcbind/rpcbind.initd b/testing/rpcbind/rpcbind.initd
new file mode 100644
index 000000000..897e8e5a8
--- /dev/null
+++ b/testing/rpcbind/rpcbind.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-nds/rpcbind/files/rpcbind.initd,v 1.1 2007/12/29 09:13:55 vapier Exp $
+
+depend() {
+ use net
+ before inetd xinetd
+ after firewall
+ provide portmap
+}
+
+start() {
+ ebegin "Starting rpcbind"
+ start-stop-daemon --start --quiet --exec /sbin/rpcbind \
+ -- ${RPCBIND_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rpcbind"
+ start-stop-daemon --stop --quiet --exec /sbin/rpcbind
+ eend $?
+}
+