- merged 1.2.5 from PLD
[packages/rpcbind.git] / rpcbind.spec
index 7353ec4cb350240e5ccfdfd6d9f32833a89ffbba..a8aa6ef6339b065a3af820b4ee6c4b5020fec954 100644 (file)
@@ -1,12 +1,16 @@
+#
+# Conditional build:
+%bcond_with    rmtcalls        # Remote Calls
+
 Summary:       Universal addresses to RPC program number mapper
 Summary(pl.UTF-8):     Demon odwzorowujący adresy uniwersalne na numery programów RPC
 Name:          rpcbind
-Version:       0.2.4
+Version:       1.2.5
 Release:       1
 License:       BSD
 Group:         Daemons
 Source0:       http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
-# Source0-md5: cf10cd41ed8228fc54c316191c1f07fe
+# Source0-md5: ed46f09b9c0fa2d49015f6431bc5ea7b
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Patch0:                %{name}-libwrap.patch
@@ -18,7 +22,7 @@ Patch6:               %{name}-tcp-addrs.patch
 URL:           http://sourceforge.net/projects/rpcbind/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
-BuildRequires: libtirpc-devel >= 1:0.1.10
+BuildRequires: libtirpc-devel >= 1:1.0.1
 BuildRequires: libtool
 BuildRequires: libwrap-devel
 BuildRequires: pkgconfig
@@ -29,7 +33,6 @@ Requires:     rc-scripts >= 0.4.1.6
 Provides:      portmap = 8.0
 Provides:      user(rpc)
 Obsoletes:     portmap
-Obsoletes:     rpcbind-systemd
 Conflicts:     clusternfs < 3.0-0.rc2.3
 Conflicts:     flixengine < 8.0.8.2-1
 Conflicts:     nfs-utils < 1.1.0-0.rc2.1
@@ -60,7 +63,10 @@ wywołania RPC na serwerze na tej maszynie.
 %{__autoconf}
 %{__automake}
 %configure \
+       --sbindir=/sbin \
+       --bindir=%{_sbindir} \
        --enable-libwrap \
+       %{?with_rmtcalls:--enable-rmtcalls} \
        --enable-warmstarts \
        --with-statedir=/var/lib/rpcbind \
        --with-rpcuser=rpc \
@@ -69,13 +75,10 @@ wywołania RPC na serwerze na tej maszynie.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
-       $RPM_BUILD_ROOT{%{_mandir}/man8,%{_var}/lib/%{name}}
-
-install rpcbind $RPM_BUILD_ROOT/sbin
-install rpcinfo $RPM_BUILD_ROOT%{_sbindir}
+install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d},/var/lib/rpcbind}
 
-install man/{rpcbind,rpcinfo}.8 $RPM_BUILD_ROOT%{_mandir}/man8
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpcbind
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rpcbind
@@ -104,8 +107,8 @@ fi
 %triggerpostun -- %{name} < 0.2.0-5
 if [ -f /etc/sysconfig/rpcbind ]; then
        . /etc/sysconfig/rpcbind
-       [ "$RPCBIND_VERBOSE" == "no" ] || RPCBIND_OPTIONS="-l"
-       [ "$RPCBIND_INSECURE" == "yes" ] && RPCBIND_OPTIONS="$RPCBIND_OPTIONS -i"
+       [ "$RPCBIND_VERBOSE" = "no" ] || RPCBIND_OPTIONS="-l"
+       [ "$RPCBIND_INSECURE" = "yes" ] && RPCBIND_OPTIONS="$RPCBIND_OPTIONS -i"
        for a in $RPCBIND_ADDRESSES ; do
                RPCBIND_OPTIONS="$RPCBIND_OPTIONS -h $a"
        done