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