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