summaryrefslogtreecommitdiff
path: root/user/rpcbind
diff options
context:
space:
mode:
authorDan Theisen <djt@hxx.in>2018-09-29 21:48:33 -0700
committerDan Theisen <djt@hxx.in>2018-09-30 15:00:55 -0700
commit2031d871d51fce1698448e13340a3c2cfac972ed (patch)
tree98171796094f463b31b61cf35b80033898e14be3 /user/rpcbind
parente668f57c242e3b2480944703f0d27ac89438019e (diff)
downloadpackages-2031d871d51fce1698448e13340a3c2cfac972ed.tar.gz
packages-2031d871d51fce1698448e13340a3c2cfac972ed.tar.bz2
packages-2031d871d51fce1698448e13340a3c2cfac972ed.tar.xz
packages-2031d871d51fce1698448e13340a3c2cfac972ed.zip
user/rpcbind: new package
Diffstat (limited to 'user/rpcbind')
-rw-r--r--user/rpcbind/APKBUILD43
-rw-r--r--user/rpcbind/rpcbind.confd5
-rw-r--r--user/rpcbind/rpcbind.initd25
-rw-r--r--user/rpcbind/rpcbind.pre-install6
l---------user/rpcbind/rpcbind.pre-upgrade1
5 files changed, 80 insertions, 0 deletions
diff --git a/user/rpcbind/APKBUILD b/user/rpcbind/APKBUILD
new file mode 100644
index 000000000..c9f8cc956
--- /dev/null
+++ b/user/rpcbind/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Dan Theisen <djt@hxx.in>
+pkgname=rpcbind
+pkgver=1.2.5
+pkgrel=0
+pkgdesc="portmap replacement which supports RPC over various protocols"
+url="http://rpcbind.sourceforge.net"
+arch="all"
+options="!check" # No test suite.
+license="BSD-3-Clause"
+depends=""
+install="$pkgname.pre-install $pkgname.pre-upgrade"
+makedepends="libtirpc-dev bsd-compat-headers"
+subpackages="$pkgname-dbg $pkgname-doc $pkgname-openrc"
+source="http://downloads.sourceforge.net/project/rpcbind/rpcbind/$pkgver/rpcbind-$pkgver.tar.bz2
+ rpcbind.initd
+ rpcbind.confd"
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --bindir=/sbin \
+ --enable-warmstarts \
+ --with-statedir=/var/lib/rpcbind \
+ --with-rpcuser=rpc \
+ --enable-debug \
+ --with-systemdsystemunitdir='no'
+ make
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ 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
+}
+sha512sums="e884c4757950ccead0f9a07f50625a63e6f18f9bfae9fcfffa3e5fa4b7a66c3a99d9fa303061848fe8211509d5456f24ff26e4579af6e161a35522268f3ef3e4 rpcbind-1.2.5.tar.bz2
+1cd655d86226a45fa3e927f8ac2bb580537644d2fb3684e0f4a956bf3721c95d95b8b8c1d9a2a742fb714eeba9277e0400a7493bf1bf676466d70adb2b35a88e rpcbind.initd
+0641087162ebc8fb10c5cb329105261d77cad073daed3f9a6c92574177298cd8a19a87b62dde14161cc554b5e68680cfd870b5334f3cfd8d6074ec8a43f4dfe3 rpcbind.confd"
diff --git a/user/rpcbind/rpcbind.confd b/user/rpcbind/rpcbind.confd
new file mode 100644
index 000000000..973320202
--- /dev/null
+++ b/user/rpcbind/rpcbind.confd
@@ -0,0 +1,5 @@
+# /etc/conf.d/rpcbind
+
+# Options for `rpcbind`.
+RPCBIND_OPTS="-w"
+
diff --git a/user/rpcbind/rpcbind.initd b/user/rpcbind/rpcbind.initd
new file mode 100644
index 000000000..b979c2226
--- /dev/null
+++ b/user/rpcbind/rpcbind.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# 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 $?
+}
+
diff --git a/user/rpcbind/rpcbind.pre-install b/user/rpcbind/rpcbind.pre-install
new file mode 100644
index 000000000..771cdbf7b
--- /dev/null
+++ b/user/rpcbind/rpcbind.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S rpc 2>/dev/null
+adduser -S -D -h /var/lib/rpcbind -s /sbin/nologin -G rpc -g rpc rpc 2>/dev/null
+
+exit 0
diff --git a/user/rpcbind/rpcbind.pre-upgrade b/user/rpcbind/rpcbind.pre-upgrade
new file mode 120000
index 000000000..1ba8b0c77
--- /dev/null
+++ b/user/rpcbind/rpcbind.pre-upgrade
@@ -0,0 +1 @@
+rpcbind.pre-install \ No newline at end of file