]> git.pld-linux.org Git - packages/rpcbind.git/blame - rpcbind.spec
- rel 4
[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
3bcf7d5c 4Version: 0.2.0
8fdb0aee 5Release: 4
ab1fd8f8
JR
6License: GPL
7Group: Daemons
6ce3323f 8Source0: http://dl.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
3bcf7d5c 9# Source0-md5: 1a77ddb1aaea8099ab19c351eeb26316
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
d8947740
JR
17Patch3: %{name}-usage.patch
18Patch4: %{name}-SO_REUSEADDR.patch
19Patch5: %{name}-nofork.patch
91d7b714 20Patch6: %{name}-tcp-addrs.patch
4f276cf9
AM
21# http://nfsv4.bullopensource.org/doc/tirpc_rpcbind.php
22URL: http://sourceforge.net/projects/rpcbind/
ab1fd8f8
JR
23BuildRequires: autoconf
24BuildRequires: automake
04bc328c 25BuildRequires: libtirpc-devel >= 1:0.1.10
5cabda1b 26BuildRequires: libtool
ab1fd8f8 27BuildRequires: libwrap-devel
7a5b9a75 28BuildRequires: rpmbuild(macros) >= 1.623
ab1fd8f8
JR
29Requires(post,preun): /sbin/chkconfig
30Requires: /sbin/chkconfig
2db5233f 31Requires: rc-scripts >= 0.4.1.6
bad88060 32Provides: portmap = 8.0
ab1fd8f8 33Provides: user(rpc)
b040aaa7
JB
34Obsoletes: portmap
35Conflicts: clusternfs < 3.0-0.rc2.3
36Conflicts: flixengine < 8.0.8.2-1
123d354b
JR
37Conflicts: nfs-utils < 1.1.0-0.rc2.1
38Conflicts: quota-rquotad < 1:3.14-4
ab1fd8f8
JR
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41%description
42The rpcbind utility is a server that converts RPC program numbers into
b040aaa7 43universal addresses. It must be running on the host to be able to make
ab1fd8f8
JR
44RPC calls on a server on that machine.
45
b040aaa7
JB
46%description -l pl.UTF-8
47Narzędzie rpcbind to serwer konwertujący numery programów RPC na
48adresy uniwersalne. Musi działać na maszynie, aby można było wykonywać
49wywołania RPC na serwerze na tej maszynie.
50
7a5b9a75
JR
51%package systemd
52Summary: systemd units for rpcbind
53Summary(pl.UTF-8): Jednostki systemd dla demona rpcbind
54Group: Daemons
55Requires: %{name} = %{version}-%{release}
56Requires: systemd
57Requires: systemd-units
58
59%description systemd
60systemd units for rpcbind.
61
62%description systemd -l pl.UTF-8
63Jednostki systemd dla demona rpcbind.
64
ab1fd8f8
JR
65%prep
66%setup -q
04bc328c
JR
67%patch0 -p1
68%patch1 -p1
57474918 69%patch2 -p1
d8947740
JR
70%patch3 -p1
71%patch4 -p1
72%patch5 -p1
91d7b714 73%patch6 -p1
ab1fd8f8
JR
74
75%build
5cabda1b 76%{__libtoolize}
ab1fd8f8 77%{__aclocal}
ab1fd8f8 78%{__autoheader}
b49db8b2 79%{__autoconf}
ab1fd8f8 80%{__automake}
b49db8b2
JR
81%configure \
82 --enable-libwrap \
83 --enable-warmstarts \
84 --with-statedir=/var/lib/rpcbind \
85 --with-rpcuser=rpc
ab1fd8f8
JR
86%{__make}
87
88%install
89rm -rf $RPM_BUILD_ROOT
90install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
7a5b9a75 91 $RPM_BUILD_ROOT{%{_mandir}/man8,%{_var}/lib/%{name},%{systemdunitdir}}
ab1fd8f8
JR
92
93install src/rpcbind $RPM_BUILD_ROOT/sbin
94install src/rpcinfo $RPM_BUILD_ROOT%{_sbindir}
95
96install man/{rpcbind,rpcinfo}.8 $RPM_BUILD_ROOT%{_mandir}/man8
97
98install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpcbind
99install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rpcbind
100
7a5b9a75
JR
101install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/rpcbind.service
102install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/rpcbind.socket
103
ab1fd8f8
JR
104%clean
105rm -rf $RPM_BUILD_ROOT
106
107%pre
108%useradd -u 22 -d /usr/share/empty -s /bin/false -c "Portmapper RPC User" -g nobody rpc
109
110%post
111/sbin/chkconfig --add rpcbind
112%service rpcbind restart
113
114%postun
115if [ "$1" = "0" ]; then
116 %userremove rpc
117fi
118
119%preun
120if [ "$1" = "0" ]; then
121 %service -q rpcbind stop
122 /sbin/chkconfig --del rpcbind
123fi
124
7a5b9a75
JR
125%post systemd
126%systemd_post rpcbind.service
127
128%preun systemd
129%systemd_preun rpcbind.service
130
131%postun systemd
132%systemd_reload
133
134%triggerpostun -- %{name} < 0.2.0-4
135if [ -f /etc/sysconfig/rpcbind ]; then
136 . /etc/sysconfig/rpcbind
137 [ "$RPCBIND_VERBOSE" == "no" ] || RPCBIND_OPTIONS="-l"
138 [ "$RPCBIND_INSECURE" == "yes" ] && RPCBIND_OPTIONS="$RPCBIND_OPTIONS -i"
139 for a in $RPCBIND_ADDRESSES ; do
140 RPCBIND_OPTIONS="$RPCBIND_OPTIONS -h $a"
141 done
142 [ -z "$RPCBIND_OPTIONS" ] && exit 0
143 cp -f /etc/sysconfig/rpcbind /etc/sysconfig/rpcbind.rpmsave
8fdb0aee
JR
144 echo >>/etc/sysconfig/rpcbind
145 echo "# Added by rpm trigger" >>/etc/sysconfig/rpcbind
7a5b9a75
JR
146 echo "RPCBIND_OPTIONS=\"$RPCBIND_OPTIONS\"" >> /etc/sysconfig/rpcbind
147fi
148
ab1fd8f8
JR
149%files
150%defattr(644,root,root,755)
151%doc AUTHORS ChangeLog NEWS README
152%attr(754,root,root) /etc/rc.d/init.d/rpcbind
153%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpcbind
154%attr(755,root,root) /sbin/*
155%attr(755,root,root) %{_sbindir}/*
156%{_mandir}/man8/*.8*
157%dir %attr(700,rpc,root) %{_var}/lib/%{name}
7a5b9a75
JR
158
159%files systemd
160%defattr(644,root,root,755)
161%{systemdunitdir}/rpcbind.service
162%{systemdunitdir}/rpcbind.socket
This page took 0.081615 seconds and 4 git commands to generate.