forked from rpms/rpcbind
Spec file clean up
Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
parent
4d358c968f
commit
eb69b46b83
52
rpcbind.spec
52
rpcbind.spec
@ -1,8 +1,6 @@
|
|||||||
%{!?_initddir:%define _initddir /etc/rc.d/init.d}
|
|
||||||
|
|
||||||
Name: rpcbind
|
Name: rpcbind
|
||||||
Version: 0.2.0
|
Version: 0.2.0
|
||||||
Release: 12%{?dist}
|
Release: 13%{?dist}
|
||||||
Summary: Universal Addresses to RPC Program Number Mapper
|
Summary: Universal Addresses to RPC Program Number Mapper
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -10,22 +8,19 @@ URL: http://nfsv4.bullopensource.org
|
|||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
|
||||||
Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
|
Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
|
||||||
Source1: rpcbind.init
|
Source1: rpcbind.service
|
||||||
Source2: rpcbind.service
|
Source2: rpcbind.socket
|
||||||
Source3: rpcbind.socket
|
|
||||||
%define rpcbind_services %{SOURCE2} %{SOURCE3}
|
|
||||||
|
|
||||||
Patch001: rpcbind-0_2_1-rc3.patch
|
Patch001: rpcbind-0_2_1-rc3.patch
|
||||||
|
|
||||||
Requires: glibc-common setup
|
Requires: glibc-common setup
|
||||||
Conflicts: man-pages < 2.43-12
|
Conflicts: man-pages < 2.43-12
|
||||||
BuildRequires: automake, autoconf, libtool
|
BuildRequires: automake, autoconf, libtool, systemd-units
|
||||||
BuildRequires: libtirpc-devel, quota-devel, tcp_wrappers-devel
|
BuildRequires: libtirpc-devel, quota-devel, tcp_wrappers-devel
|
||||||
Requires(pre): /usr/sbin/groupadd /usr/sbin/groupdel
|
Requires(pre): coreutils shadow-utils
|
||||||
Requires(pre): /usr/sbin/useradd /usr/sbin/userdel
|
Requires(post): chkconfig systemd-units systemd-sysv
|
||||||
Requires(pre): coreutils
|
Requires(preun): systemd-units
|
||||||
Requires(post): /sbin/chkconfig
|
Requires(postun): systemd-units coreutils
|
||||||
Requires(post): /sbin/chkconfig
|
|
||||||
|
|
||||||
Provides: portmap = %{version}-%{release}
|
Provides: portmap = %{version}-%{release}
|
||||||
Obsoletes: portmap <= 4.0-65.3
|
Obsoletes: portmap <= 4.0-65.3
|
||||||
@ -63,19 +58,16 @@ make all
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
mkdir -p %{buildroot}{/sbin,/usr/sbin,/lib/systemd/system}
|
mkdir -p %{buildroot}{/sbin,/usr/sbin}
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
mkdir -p %{buildroot}%{_mandir}/man8
|
mkdir -p %{buildroot}%{_mandir}/man8
|
||||||
mkdir -p %{buildroot}/var/lib/rpcbind
|
mkdir -p %{buildroot}/var/lib/rpcbind
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcbind ${RPM_BUILD_ROOT}/sbin
|
mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcbind ${RPM_BUILD_ROOT}/sbin
|
||||||
mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}
|
mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}
|
||||||
install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initddir}/rpcbind
|
install -m644 %{SOURCE1} %{buildroot}%{_unitdir}
|
||||||
for service in %{rpcbind_services} ; do
|
install -m644 %{SOURCE2} %{buildroot}%{_unitdir}
|
||||||
install -m 644 $service $RPM_BUILD_ROOT/lib/systemd/system
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -100,13 +92,13 @@ fi
|
|||||||
%post
|
%post
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
# Package install, not upgrade
|
# Package install, not upgrade
|
||||||
/bin/systemctl enable rpcbind.service >/dev/null 2>&1 || :
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
# Package removal, not upgrade
|
# Package removal, not upgrade
|
||||||
/bin/systemctl disable rpcbind.service >/dev/null 2>&1 || :
|
/bin/systemctl --no-reload rpcbind.service >/dev/null 2>&1 || :
|
||||||
/bin/systemctl stop rpcbind.service >/dev/null 2>&1 || :
|
/bin/systemctl stop rpcbind.service >/dev/null 2>&1 || :
|
||||||
/usr/sbin/userdel rpc 2>/dev/null || :
|
/usr/sbin/userdel rpc 2>/dev/null || :
|
||||||
/usr/sbin/groupdel rpc 2>/dev/null || :
|
/usr/sbin/groupdel rpc 2>/dev/null || :
|
||||||
@ -114,24 +106,32 @@ if [ $1 -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
%postun
|
%postun
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
if [ "$1" -ge "1" ]; then
|
if [ $1 -ge 1 ]; then
|
||||||
# Package upgrade, not uninstall
|
# Package upgrade, not uninstall
|
||||||
/bin/systemctl try-restart rpcbind.service >/dev/null 2>&1 || :
|
/bin/systemctl try-restart rpcbind.service >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%triggerun -- rpcbind < 0.2.0-12
|
||||||
|
%{_bindir}/systemd-sysv-convert --save rpcbind >/dev/null 2>&1 ||:
|
||||||
|
/bin/systemctl enable rpcbind.service >/dev/null 2>&1
|
||||||
|
/sbin/chkconfig --del rpcbind >/dev/null 2>&1 || :
|
||||||
|
/bin/systemctl try-restart rpcbind.service >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc AUTHORS ChangeLog README
|
%doc AUTHORS ChangeLog README
|
||||||
/sbin/rpcbind
|
/sbin/rpcbind
|
||||||
%{_sbindir}/rpcinfo
|
%{_sbindir}/rpcinfo
|
||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
%config %{_initddir}/rpcbind
|
%{_unitdir}/rpcbind.service
|
||||||
/lib/systemd/system/*.service
|
%{_unitdir}/rpcbind.socket
|
||||||
/lib/systemd/system/*.socket
|
|
||||||
|
|
||||||
%dir %attr(700,rpc,rpc) /var/lib/rpcbind
|
%dir %attr(700,rpc,rpc) /var/lib/rpcbind
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 8 2011 Steve Dickson <steved@redhat.com> - 0.2.0-13
|
||||||
|
- Spec file clean up
|
||||||
|
|
||||||
* Thu Jul 7 2011 Steve Dickson <steved@redhat.com> - 0.2.0-12
|
* Thu Jul 7 2011 Steve Dickson <steved@redhat.com> - 0.2.0-12
|
||||||
- Migrated SysV initscripts to systemd (bz 713574)
|
- Migrated SysV initscripts to systemd (bz 713574)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user