]> git.pld-linux.org Git - packages/rpcbind.git/blame - rpcbind.spec
- updated to 0.2.3
[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
d8b0171a
JR
4Version: 0.2.3
5Release: 1
9425805f 6License: BSD
ab1fd8f8 7Group: Daemons
4705a5bc 8Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
d8b0171a 9# Source0-md5: c8875246b2688a1adfbd6ad43480278d
ab1fd8f8
JR
10Source1: %{name}.init
11Source2: %{name}.sysconfig
7a5b9a75
JR
12Source3: %{name}.service
13Source4: %{name}.socket
04bc328c
JR
14Patch0: %{name}-libwrap.patch
15Patch1: %{name}-syslog.patch
57474918 16Patch2: %{name}-sunrpc.patch
6dcb5b58 17Patch3: %{name}-nss.h.patch
91d7b714 18Patch6: %{name}-tcp-addrs.patch
4f276cf9
AM
19# http://nfsv4.bullopensource.org/doc/tirpc_rpcbind.php
20URL: http://sourceforge.net/projects/rpcbind/
9425805f 21BuildRequires: autoconf >= 2.50
ab1fd8f8 22BuildRequires: automake
04bc328c 23BuildRequires: libtirpc-devel >= 1:0.1.10
5cabda1b 24BuildRequires: libtool
ab1fd8f8 25BuildRequires: libwrap-devel
9425805f 26BuildRequires: pkgconfig
7a5b9a75 27BuildRequires: rpmbuild(macros) >= 1.623
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
d8b0171a 59#%patch6 -p1
ab1fd8f8
JR
60
61%build
5cabda1b 62%{__libtoolize}
ab1fd8f8 63%{__aclocal}
b49db8b2 64%{__autoconf}
ab1fd8f8 65%{__automake}
b49db8b2
JR
66%configure \
67 --enable-libwrap \
68 --enable-warmstarts \
69 --with-statedir=/var/lib/rpcbind \
70 --with-rpcuser=rpc
ab1fd8f8
JR
71%{__make}
72
73%install
74rm -rf $RPM_BUILD_ROOT
75install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
7a5b9a75 76 $RPM_BUILD_ROOT{%{_mandir}/man8,%{_var}/lib/%{name},%{systemdunitdir}}
ab1fd8f8 77
4705a5bc
JR
78install rpcbind $RPM_BUILD_ROOT/sbin
79install rpcinfo $RPM_BUILD_ROOT%{_sbindir}
ab1fd8f8
JR
80
81install man/{rpcbind,rpcinfo}.8 $RPM_BUILD_ROOT%{_mandir}/man8
82
83install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpcbind
84install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rpcbind
85
7a5b9a75
JR
86install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/rpcbind.service
87install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/rpcbind.socket
88
ab1fd8f8
JR
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%pre
93%useradd -u 22 -d /usr/share/empty -s /bin/false -c "Portmapper RPC User" -g nobody rpc
94
95%post
96/sbin/chkconfig --add rpcbind
97%service rpcbind restart
c84db1a4 98%systemd_post rpcbind.service
ab1fd8f8
JR
99
100%postun
101if [ "$1" = "0" ]; then
102 %userremove rpc
103fi
c84db1a4 104%systemd_reload
ab1fd8f8
JR
105
106%preun
107if [ "$1" = "0" ]; then
108 %service -q rpcbind stop
109 /sbin/chkconfig --del rpcbind
110fi
7a5b9a75
JR
111%systemd_preun rpcbind.service
112
c84db1a4 113%triggerpostun -- %{name} < 0.2.0-5
7a5b9a75
JR
114if [ -f /etc/sysconfig/rpcbind ]; then
115 . /etc/sysconfig/rpcbind
116 [ "$RPCBIND_VERBOSE" == "no" ] || RPCBIND_OPTIONS="-l"
117 [ "$RPCBIND_INSECURE" == "yes" ] && RPCBIND_OPTIONS="$RPCBIND_OPTIONS -i"
118 for a in $RPCBIND_ADDRESSES ; do
119 RPCBIND_OPTIONS="$RPCBIND_OPTIONS -h $a"
120 done
121 [ -z "$RPCBIND_OPTIONS" ] && exit 0
a5609ebb 122 %{__cp} -f /etc/sysconfig/rpcbind /etc/sysconfig/rpcbind.rpmsave
8fdb0aee
JR
123 echo >>/etc/sysconfig/rpcbind
124 echo "# Added by rpm trigger" >>/etc/sysconfig/rpcbind
7a5b9a75
JR
125 echo "RPCBIND_OPTIONS=\"$RPCBIND_OPTIONS\"" >> /etc/sysconfig/rpcbind
126fi
c84db1a4 127%systemd_trigger rpcbind.service
7a5b9a75 128
ab1fd8f8
JR
129%files
130%defattr(644,root,root,755)
9425805f 131%doc AUTHORS COPYING ChangeLog NEWS README
ab1fd8f8
JR
132%attr(754,root,root) /etc/rc.d/init.d/rpcbind
133%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpcbind
9425805f
JB
134%attr(755,root,root) /sbin/rpcbind
135%attr(755,root,root) %{_sbindir}/rpcinfo
136%{_mandir}/man8/rpcbind.8*
137%{_mandir}/man8/rpcinfo.8*
ab1fd8f8 138%dir %attr(700,rpc,root) %{_var}/lib/%{name}
7a5b9a75
JR
139%{systemdunitdir}/rpcbind.service
140%{systemdunitdir}/rpcbind.socket
This page took 0.084724 seconds and 4 git commands to generate.