]>
Commit | Line | Data |
---|---|---|
ab1fd8f8 JR |
1 | Summary: Universal addresses to RPC program number mapper |
2 | Name: rpcbind | |
3 | Version: 0.1.4 | |
4 | Release: 0.4 | |
5 | License: GPL | |
6 | Group: Daemons | |
7 | Source0: http://nfsv4.bullopensource.org/tarballs/rpcbind/%{name}-%{version}.tar.bz2 | |
8 | # Source0-md5: 280539aa1f8975b1318690cd903f858a | |
9 | Source1: %{name}.init | |
10 | Source2: %{name}.sysconfig | |
11 | Patch0: %{name}-build.patch | |
12 | Patch1: %{name}-format.patch | |
13 | Patch2: %{name}-warmstart.patch | |
14 | Patch3: %{name}-rpcuser.patch | |
15 | URL: http://nfsv4.bullopensource.org/doc/tirpc_rpcbind.php | |
16 | BuildRequires: autoconf | |
17 | BuildRequires: automake | |
18 | BuildRequires: libtirpc-devel | |
19 | BuildRequires: libwrap-devel | |
20 | BuildRequires: rpmbuild(macros) >= 1.228 | |
21 | Requires(post,preun): /sbin/chkconfig | |
22 | Requires: /sbin/chkconfig | |
23 | Requires: rc-scripts | |
24 | Provides: portmap | |
25 | Provides: user(rpc) | |
26 | Obsoletes: portmap | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | The rpcbind utility is a server that converts RPC program numbers into | |
31 | universal addresses. It must be running on the host to be able to make | |
32 | RPC calls on a server on that machine. | |
33 | ||
34 | %prep | |
35 | %setup -q | |
36 | %patch0 -p1 | |
37 | %patch1 -p1 | |
38 | %patch2 -p1 | |
39 | %patch3 -p1 | |
40 | ||
41 | %build | |
42 | %{__aclocal} | |
43 | %{__autoconf} | |
44 | %{__autoheader} | |
45 | %{__automake} | |
46 | cp -f /usr/share/automake/config.sub . | |
47 | %configure | |
48 | %{__make} | |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \ | |
53 | $RPM_BUILD_ROOT{%{_mandir}/man8,%{_var}/lib/%{name}} | |
54 | ||
55 | install src/rpcbind $RPM_BUILD_ROOT/sbin | |
56 | install src/rpcinfo $RPM_BUILD_ROOT%{_sbindir} | |
57 | ||
58 | install man/{rpcbind,rpcinfo}.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
59 | ||
60 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpcbind | |
61 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rpcbind | |
62 | ||
63 | %clean | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %pre | |
67 | %useradd -u 22 -d /usr/share/empty -s /bin/false -c "Portmapper RPC User" -g nobody rpc | |
68 | ||
69 | %post | |
70 | /sbin/chkconfig --add rpcbind | |
71 | %service rpcbind restart | |
72 | ||
73 | %postun | |
74 | if [ "$1" = "0" ]; then | |
75 | %userremove rpc | |
76 | fi | |
77 | ||
78 | %preun | |
79 | if [ "$1" = "0" ]; then | |
80 | %service -q rpcbind stop | |
81 | /sbin/chkconfig --del rpcbind | |
82 | fi | |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
86 | %doc AUTHORS ChangeLog NEWS README | |
87 | %attr(754,root,root) /etc/rc.d/init.d/rpcbind | |
88 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpcbind | |
89 | %attr(755,root,root) /sbin/* | |
90 | %attr(755,root,root) %{_sbindir}/* | |
91 | %{_mandir}/man8/*.8* | |
92 | %dir %attr(700,rpc,root) %{_var}/lib/%{name} |