1
0
forked from rpms/rpcbind
rpcbind/rpcbind.spec

93 lines
2.0 KiB
RPMSpec
Raw Normal View History

2006-08-10 20:26:57 +00:00
%{!?_initdir:%define _initdir /etc/rc.d/init.d}
Name: rpcbind
Version: 0.1.4
Release: 1%{?dist}
Summary: Universal Addresses to RPC Program Number Napper
Group: System Environment/Daemons
License: GPL
URL: http://nfsv4.bullopensource.org
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
Source0: http://nfsv4.bullopensource.org/tarballs/rpcbind/rpcbind-0.1.4.tar.bz2
Source1: rpcbind.init
BuildRequires: automake, autoconf, libtool
BuildRequires: libtirpc-devel
Requires(post): /sbin/chkconfig
Requires(post): /sbin/chkconfig
Requires: libtirpc
Patch1: rpcbind-0.1.4-compile.patch
Patch2: rpcbind-0.1.4-debug.patch
Patch3: rpcbind-0.1.4-warmstarts.patch
%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.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%ifarch s390 s390x
PIE="-fPIE"
%else
PIE="-fpie"
%endif
export PIE
CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
autoreconf -fisv
%configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
--enable-warmstarts \
--enable-debug \
--prefix=%{buildroot}
make all
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/bin
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
mkdir -p %{buildroot}%{_mandir}/man8
make DESTDIR=%{buildroot} install
install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initdir}/rpcbind
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add %{name}
%preun
if [ $1 -eq 0 ]; then
service rpcbind stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -ge "1" ]; then
service rpcbind condrestart > /dev/null 2>&1
fi
exit 0
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog README
%{_bindir}/rpcinfo
%{_bindir}/rpcbind
%{_mandir}/man8/*
%config %{_initdir}/rpcbind
%changelog
* Wed Aug 9 2006 Steve Dickson <steved@redhat.com> 0.1.4-1
- Initial commit