]> git.pld-linux.org Git - packages/rpcbind.git/blame - rpcbind.spec
- allow building on systems without systemd
[packages/rpcbind.git] / rpcbind.spec
CommitLineData
3c37f6c8
JB
1#
2# Conditional build:
3%bcond_with rmtcalls # Remote Calls
67047356 4%bcond_without systemd # systemd
3c37f6c8 5
ab1fd8f8 6Summary: Universal addresses to RPC program number mapper
b040aaa7 7Summary(pl.UTF-8): Demon odwzorowujący adresy uniwersalne na numery programów RPC
ab1fd8f8 8Name: rpcbind
7c844428 9Version: 1.2.6
08d09795 10Release: 2
9425805f 11License: BSD
ab1fd8f8 12Group: Daemons
7c844428
JB
13Source0: https://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
14# Source0-md5: 2d84ebbb7d6fb1fc3566d2d4b37f214b
ab1fd8f8
JR
15Source1: %{name}.init
16Source2: %{name}.sysconfig
04bc328c
JR
17Patch0: %{name}-libwrap.patch
18Patch1: %{name}-syslog.patch
57474918 19Patch2: %{name}-sunrpc.patch
6dcb5b58 20Patch3: %{name}-nss.h.patch
743aa286 21Patch4: %{name}-systemd.patch
91d7b714 22Patch6: %{name}-tcp-addrs.patch
4f276cf9
AM
23# http://nfsv4.bullopensource.org/doc/tirpc_rpcbind.php
24URL: http://sourceforge.net/projects/rpcbind/
9425805f 25BuildRequires: autoconf >= 2.50
ab1fd8f8 26BuildRequires: automake
8a22ccb4 27BuildRequires: libtirpc-devel >= 1:1.0.1
5cabda1b 28BuildRequires: libtool
ab1fd8f8 29BuildRequires: libwrap-devel
9425805f 30BuildRequires: pkgconfig
7a5b9a75 31BuildRequires: rpmbuild(macros) >= 1.623
67047356 32%{?with_systemd:BuildRequires: systemd-devel}
ab1fd8f8 33Requires(post,preun): /sbin/chkconfig
9782f463 34Requires(post,preun,postun): systemd-units >= 38
ab1fd8f8 35Requires: /sbin/chkconfig
2db5233f 36Requires: rc-scripts >= 0.4.1.6
c84db1a4 37Requires: systemd-units >= 0.38
bad88060 38Provides: portmap = 8.0
ab1fd8f8 39Provides: user(rpc)
7c844428
JB
40Obsoletes: portmap < 6.1
41Obsoletes: rpcbind-systemd < 0.2.0-5
b040aaa7
JB
42Conflicts: clusternfs < 3.0-0.rc2.3
43Conflicts: flixengine < 8.0.8.2-1
123d354b
JR
44Conflicts: nfs-utils < 1.1.0-0.rc2.1
45Conflicts: quota-rquotad < 1:3.14-4
ab1fd8f8
JR
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
49The rpcbind utility is a server that converts RPC program numbers into
b040aaa7 50universal addresses. It must be running on the host to be able to make
ab1fd8f8
JR
51RPC calls on a server on that machine.
52
b040aaa7
JB
53%description -l pl.UTF-8
54Narzędzie rpcbind to serwer konwertujący numery programów RPC na
55adresy uniwersalne. Musi działać na maszynie, aby można było wykonywać
56wywołania RPC na serwerze na tej maszynie.
57
ab1fd8f8
JR
58%prep
59%setup -q
04bc328c
JR
60%patch0 -p1
61%patch1 -p1
57474918 62%patch2 -p1
6dcb5b58 63%patch3 -p1
743aa286 64%patch4 -p1
b7843589 65%patch6 -p1
ab1fd8f8
JR
66
67%build
5cabda1b 68%{__libtoolize}
ab1fd8f8 69%{__aclocal}
b49db8b2 70%{__autoconf}
ab1fd8f8 71%{__automake}
b49db8b2 72%configure \
3c37f6c8
JB
73 --sbindir=/sbin \
74 --bindir=%{_sbindir} \
b49db8b2 75 --enable-libwrap \
3c37f6c8 76 %{?with_rmtcalls:--enable-rmtcalls} \
b49db8b2
JR
77 --enable-warmstarts \
78 --with-statedir=/var/lib/rpcbind \
b7843589 79 --with-rpcuser=rpc \
67047356 80%if %{with systemd}
743aa286 81 --with-systemdsystemunitdir=%{systemdunitdir}
67047356
MK
82%else
83 --without-systemdsystemunitdir
84%endif
ab1fd8f8
JR
85%{__make}
86
87%install
88rm -rf $RPM_BUILD_ROOT
743aa286 89install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d},/var/lib/rpcbind}
ab1fd8f8 90
743aa286
JB
91%{__make} install \
92 DESTDIR=$RPM_BUILD_ROOT
ab1fd8f8 93
ab1fd8f8
JR
94install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpcbind
95install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rpcbind
96
97%clean
98rm -rf $RPM_BUILD_ROOT
99
100%pre
101%useradd -u 22 -d /usr/share/empty -s /bin/false -c "Portmapper RPC User" -g nobody rpc
102
103%post
104/sbin/chkconfig --add rpcbind
105%service rpcbind restart
c84db1a4 106%systemd_post rpcbind.service
ab1fd8f8
JR
107
108%postun
109if [ "$1" = "0" ]; then
110 %userremove rpc
111fi
c84db1a4 112%systemd_reload
ab1fd8f8
JR
113
114%preun
115if [ "$1" = "0" ]; then
116 %service -q rpcbind stop
117 /sbin/chkconfig --del rpcbind
118fi
7a5b9a75
JR
119%systemd_preun rpcbind.service
120
c84db1a4 121%triggerpostun -- %{name} < 0.2.0-5
7a5b9a75
JR
122if [ -f /etc/sysconfig/rpcbind ]; then
123 . /etc/sysconfig/rpcbind
743aa286
JB
124 [ "$RPCBIND_VERBOSE" = "no" ] || RPCBIND_OPTIONS="-l"
125 [ "$RPCBIND_INSECURE" = "yes" ] && RPCBIND_OPTIONS="$RPCBIND_OPTIONS -i"
7a5b9a75
JR
126 for a in $RPCBIND_ADDRESSES ; do
127 RPCBIND_OPTIONS="$RPCBIND_OPTIONS -h $a"
128 done
129 [ -z "$RPCBIND_OPTIONS" ] && exit 0
a5609ebb 130 %{__cp} -f /etc/sysconfig/rpcbind /etc/sysconfig/rpcbind.rpmsave
8fdb0aee
JR
131 echo >>/etc/sysconfig/rpcbind
132 echo "# Added by rpm trigger" >>/etc/sysconfig/rpcbind
7a5b9a75
JR
133 echo "RPCBIND_OPTIONS=\"$RPCBIND_OPTIONS\"" >> /etc/sysconfig/rpcbind
134fi
c84db1a4 135%systemd_trigger rpcbind.service
7a5b9a75 136
ab1fd8f8
JR
137%files
138%defattr(644,root,root,755)
9425805f 139%doc AUTHORS COPYING ChangeLog NEWS README
ab1fd8f8
JR
140%attr(754,root,root) /etc/rc.d/init.d/rpcbind
141%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpcbind
9425805f
JB
142%attr(755,root,root) /sbin/rpcbind
143%attr(755,root,root) %{_sbindir}/rpcinfo
144%{_mandir}/man8/rpcbind.8*
145%{_mandir}/man8/rpcinfo.8*
ab1fd8f8 146%dir %attr(700,rpc,root) %{_var}/lib/%{name}
67047356 147%if %{with systemd}
7a5b9a75
JR
148%{systemdunitdir}/rpcbind.service
149%{systemdunitdir}/rpcbind.socket
67047356
MK
150%endif
151
This page took 0.159161 seconds and 5 git commands to generate.