forked from rpms/rpcbind
- Added dependency on man-pages so the rpcinfo man pages don't conflict.
- Added the creation of /var/lib/rpcinfo which will be used to store state files.
This commit is contained in:
parent
8a2c049cab
commit
cd28606363
36
rpcbind.spec
36
rpcbind.spec
@ -13,12 +13,13 @@ Source0: http://nfsv4.bullopensource.org/tarballs/rpcbind/rpcbind-0.1.4.t
|
||||
Source1: rpcbind.init
|
||||
|
||||
Requires: glibc-common >= 2.5.90-20
|
||||
Requires: man-pages >= 2.43-12
|
||||
BuildRequires: automake, autoconf, libtool
|
||||
BuildRequires: libtirpc-devel quota
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(post): /sbin/chkconfig
|
||||
|
||||
Provides: portmap = %{version}-%{release}
|
||||
Provides: rpcinfo = %{version}-%{release}
|
||||
Obsoletes: portmap < 0.1.4-1
|
||||
|
||||
Patch1: rpcbind-0.1.4-compile.patch
|
||||
@ -56,16 +57,32 @@ make all
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
mkdir -p %{buildroot}/usr/bin
|
||||
mkdir -p %{buildroot}/sbin
|
||||
mkdir -p %{buildroot}/usr/sbin
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
|
||||
mkdir -p %{buildroot}%{_mandir}/man8
|
||||
make DESTDIR=%{buildroot} install
|
||||
mkdir -p %{buildroot}/var/lib/rpcbind
|
||||
|
||||
install -m 755 src/rpcbind ${RPM_BUILD_ROOT}/sbin
|
||||
install -m 755 src/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}
|
||||
install -m 644 man/rpcbind.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
|
||||
install -m 644 man/rpcinfo.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
|
||||
install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initdir}/rpcbind
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%pre
|
||||
# if the rpc uid and gid is left over from the portmapper
|
||||
# remove both of them.
|
||||
/usr/sbin/userdel rpc 2> /dev/null || :
|
||||
/usr/sbin/groupdel rpc 2> /dev/null || :
|
||||
|
||||
# Now re-add the rpc uid/gid
|
||||
/usr/sbin/groupadd -g 32 rpc > /dev/null 2>&1
|
||||
/usr/sbin/useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \
|
||||
-M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add %{name}
|
||||
|
||||
@ -73,6 +90,9 @@ rm -rf %{buildroot}
|
||||
if [ $1 -eq 0 ]; then
|
||||
service rpcbind stop > /dev/null 2>&1
|
||||
/sbin/chkconfig --del %{name}
|
||||
/usr/sbin/userdel rpc 2>/dev/null || :
|
||||
/usr/sbin/groupdel rpc 2>/dev/null || :
|
||||
rm -rf /var/lib/rpcbind
|
||||
fi
|
||||
%postun
|
||||
if [ "$1" -ge "1" ]; then
|
||||
@ -82,15 +102,21 @@ fi
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS ChangeLog README
|
||||
/sbin/rpcbind
|
||||
%{_sbindir}/rpcinfo
|
||||
%{_bindir}/rpcbind
|
||||
%{_mandir}/man8/*
|
||||
%config %{_initdir}/rpcbind
|
||||
|
||||
%dir %attr(700,rpc,rpc) /var/lib/rpcbind
|
||||
|
||||
%changelog
|
||||
* Mon Apr 2 2007 Steve Dickson <steved@redhat.com> 0.1.4-2
|
||||
* Tues Apr 3 2007 Steve Dickson <steved@redhat.com> 0.1.4-2
|
||||
- Added dependency on glibc-common which allows the
|
||||
rpcinfo command to be installed in the correct place.
|
||||
- Added dependency on man-pages so the rpcinfo man
|
||||
pages don't conflict.
|
||||
- Added the creation of /var/lib/rpcinfo which will be
|
||||
used to store state files.
|
||||
|
||||
* Wed Feb 21 2007 Steve Dickson <steved@redhat.com> 0.1.4-1
|
||||
- Initial commit
|
||||
|
Loading…
Reference in New Issue
Block a user