--- /dev/null
+###############################################################################
+# IPFire.org - An Open Source Firewall Solution #
+# Copyright (C) - IPFire Development Team <info@ipfire.org> #
+###############################################################################
+
+name = rpcbind
+version = 0.2.0
+release = 1
+
+groups = System/Daemons
+url = http://nfsv4.bullopensource.org
+license = BSD
+summary = Universal Addresses to RPC Program Number Mapper
+
+description
+ The rpcbind utility is a server that converts RPC program numbers into
+ universal addresses. It must be running on the host to be able to make
+ RPC calls on a server on that machine.
+end
+
+source_dl = http://downloads.sourceforge.net/rpcbind/
+sources = %{thisapp}.tar.bz2
+
+build
+ requires
+ autoconf
+ automake
+ libtirpc-devel
+ libtool
+ systemd-units
+ end
+
+ prepare_cmds
+ autoreconf -fisv
+
+ %{create_user}
+ end
+
+ configure_options += \
+ --enable-warmstarts \
+ --with-statedir=/var/lib/rpcbind \
+ --with-rpcuser=rpc \
+ --enable-debug
+
+ install_cmds
+ mkdir -pv %{BUILDROOT}%{sbindir}
+
+ mv -v %{BUILDROOT}{%{bindir},%{sbindir}}/rpcbind
+ mv -v %{BUILDROOT}{%{bindir},%{sbindir}}/rpcinfo
+
+ mkdir -pv -m 700 %{BUILDROOT}/var/lib/rpcbind
+ chown rpc:rpc %{BUILDROOT}/var/lib/rpcbind
+ end
+end
+
+create_user
+ getent group rpc >/dev/null || groupadd -r -g 32 rpc
+ getent passwd rpc >/dev/null || useradd -r -g 32 \
+ -c "Rpcbind Daemon" -d /var/lib/rpcbind -s /sbin/nologin rpc
+end
+
+packages
+ package %{name}
+ provides
+ portmap = %{thisver}
+ end
+
+ requires
+ setup >= 3.0-7
+ end
+
+ script prein
+ %{create_user}
+ end
+
+ script postin
+ systemctl daemon-reload >/dev/null 2>&1 || :
+ systemctl --no-reload enable rpcbind.service >/dev/null 2>&1 || :
+ end
+
+ script postup
+ systemctl daemon-reload >/dev/null 2>&1 || :
+ systemctl try-restart rpcbind.service >/dev/null 2>&1 || :
+ end
+
+ script preun
+ systemctl --no-reload disable rpcbind.service >/dev/null 2>&1 || :
+ systemctl stop rpcbind.service >/dev/null 2>&1 || :
+ end
+
+ script postun
+ systemctl daemon-reload >/dev/null 2>&1 || :
+ end
+ end
+
+ package %{name}-debuginfo
+ template DEBUGINFO
+ end
+end