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