106 lines
2.7 KiB
RPMSpec
106 lines
2.7 KiB
RPMSpec
|
%define groupid 59
|
||
|
%define userid 59
|
||
|
Name: rpcbind
|
||
|
Version: 0.2.1
|
||
|
Release: 1mamba
|
||
|
Summary: A replacement for portmap required for import or export of NFS shared directories
|
||
|
Group: System/Servers
|
||
|
Vendor: openmamba
|
||
|
Distribution: openmamba
|
||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||
|
URL: http://rpcbind.sourceforge.net/
|
||
|
Source: http://downloads.sourceforge.net/rpcbind/rpcbind-%{version}.tar.bz2
|
||
|
Source1: rpcbind.service
|
||
|
Source2: rpcbind.socket
|
||
|
Source3: rpcbind.sysconfig
|
||
|
Patch0: rpcbind-0.2.1-run.patch
|
||
|
Patch1: rpcbind-0.2.1-rpcuser.patch
|
||
|
Patch2: rpcbind-0.2.1-services-sunrpc.patch
|
||
|
License: BSD
|
||
|
## AUTOBUILDREQ-BEGIN
|
||
|
BuildRequires: glibc-devel
|
||
|
BuildRequires: libtirpc-devel
|
||
|
## AUTOBUILDREQ-END
|
||
|
Provides: portmap
|
||
|
Obsoletes: portmap
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||
|
|
||
|
%description
|
||
|
The rpcbind program is a replacement for portmap. It is required for import or export of Network File System (NFS) shared directories.
|
||
|
|
||
|
%debug_package
|
||
|
|
||
|
%prep
|
||
|
%setup -q
|
||
|
%patch0 -p1
|
||
|
%patch1 -p1
|
||
|
%patch2 -p1
|
||
|
|
||
|
%build
|
||
|
autoreconf -fisv
|
||
|
%configure \
|
||
|
--enable-warmstarts \
|
||
|
--with-statedir=/var/lib/rpcbind \
|
||
|
--with-rpcuser=rpc \
|
||
|
--enable-libwrap \
|
||
|
--enable-debug
|
||
|
|
||
|
%make all
|
||
|
|
||
|
%install
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
%makeinstall
|
||
|
|
||
|
install -d -m0755 %{buildroot}{/sbin,%{_sbindir}}
|
||
|
mv -f %{buildroot}%{_bindir}/rpcbind %{buildroot}/sbin
|
||
|
mv -f %{buildroot}%{_bindir}/rpcinfo %{buildroot}%{_sbindir}
|
||
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/rpcbind.service
|
||
|
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/rpcbind.socket
|
||
|
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/rpcbind
|
||
|
install -d %{buildroot}/var/lib/rpcbind
|
||
|
|
||
|
%clean
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
|
||
|
%pre
|
||
|
if [ $1 -ge 1 ]; then
|
||
|
/usr/sbin/groupadd rpc -g %{groupid} &>/dev/null
|
||
|
/usr/sbin/useradd -u %{userid} -g rpc -c 'RPC bind daemon' \
|
||
|
-d /var/empty -s /bin/false rpc &>/dev/null
|
||
|
exit 0
|
||
|
fi
|
||
|
:
|
||
|
|
||
|
%post
|
||
|
if [ $1 -ge 1 ]; then
|
||
|
systemctl -q daemon-reload
|
||
|
fi
|
||
|
if [ $1 -eq 1 ]; then
|
||
|
/bin/systemctl -q enable rpcbind >/dev/null 2>&1 || :
|
||
|
fi
|
||
|
:
|
||
|
|
||
|
%postun
|
||
|
if [ $1 -eq 0 ]; then
|
||
|
systemctl -q daemon-reload
|
||
|
/usr/sbin/userdel rpc &>/dev/null
|
||
|
/usr/sbin/groupdel rpc &>/dev/null
|
||
|
fi
|
||
|
:
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root)
|
||
|
%config(noreplace) %{_sysconfdir}/sysconfig/rpcbind
|
||
|
/sbin/rpcbind
|
||
|
%{_sbindir}/rpcinfo
|
||
|
%{_unitdir}/rpcbind.service
|
||
|
%{_unitdir}/rpcbind.socket
|
||
|
%{_mandir}/man8/rpcbind.8*
|
||
|
%{_mandir}/man8/rpcinfo.8*
|
||
|
%dir %attr(700,rpc,rpc) /var/lib/rpcbind
|
||
|
%doc AUTHORS COPYING
|
||
|
|
||
|
%changelog
|
||
|
* Sat May 10 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.1-1mamba
|
||
|
- package created using the webbuild interface
|