]> git.pld-linux.org Git - packages/rpcbind.git/blame - rpcbind.spec
- updated to 0.2.1
[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
ab1fd8f8
JR
6License: GPL
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/
ab1fd8f8
JR
20BuildRequires: autoconf
21BuildRequires: automake
04bc328c 22BuildRequires: libtirpc-devel >= 1:0.1.10
5cabda1b 23BuildRequires: libtool
ab1fd8f8 24BuildRequires: libwrap-devel
7a5b9a75 25BuildRequires: rpmbuild(macros) >= 1.623
ab1fd8f8 26Requires(post,preun): /sbin/chkconfig
9782f463 27Requires(post,preun,postun): systemd-units >= 38
ab1fd8f8 28Requires: /sbin/chkconfig
2db5233f 29Requires: rc-scripts >= 0.4.1.6
c84db1a4 30Requires: systemd-units >= 0.38
bad88060 31Provides: portmap = 8.0
ab1fd8f8 32Provides: user(rpc)
b040aaa7 33Obsoletes: portmap
13fa5d85 34Obsoletes: rpcbind-systemd
b040aaa7
JB
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
ab1fd8f8
JR
51%prep
52%setup -q
04bc328c
JR
53%patch0 -p1
54%patch1 -p1
57474918 55%patch2 -p1
91d7b714 56%patch6 -p1
ab1fd8f8
JR
57
58%build
5cabda1b 59%{__libtoolize}
ab1fd8f8 60%{__aclocal}
b49db8b2 61%{__autoconf}
ab1fd8f8 62%{__automake}
b49db8b2
JR
63%configure \
64 --enable-libwrap \
65 --enable-warmstarts \
66 --with-statedir=/var/lib/rpcbind \
67 --with-rpcuser=rpc
ab1fd8f8
JR
68%{__make}
69
70%install
71rm -rf $RPM_BUILD_ROOT
72install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
7a5b9a75 73 $RPM_BUILD_ROOT{%{_mandir}/man8,%{_var}/lib/%{name},%{systemdunitdir}}
ab1fd8f8 74
4705a5bc
JR
75install rpcbind $RPM_BUILD_ROOT/sbin
76install rpcinfo $RPM_BUILD_ROOT%{_sbindir}
ab1fd8f8
JR
77
78install man/{rpcbind,rpcinfo}.8 $RPM_BUILD_ROOT%{_mandir}/man8
79
80install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpcbind
81install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rpcbind
82
7a5b9a75
JR
83install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/rpcbind.service
84install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/rpcbind.socket
85
ab1fd8f8
JR
86%clean
87rm -rf $RPM_BUILD_ROOT
88
89%pre
90%useradd -u 22 -d /usr/share/empty -s /bin/false -c "Portmapper RPC User" -g nobody rpc
91
92%post
93/sbin/chkconfig --add rpcbind
94%service rpcbind restart
c84db1a4 95%systemd_post rpcbind.service
ab1fd8f8
JR
96
97%postun
98if [ "$1" = "0" ]; then
99 %userremove rpc
100fi
c84db1a4 101%systemd_reload
ab1fd8f8
JR
102
103%preun
104if [ "$1" = "0" ]; then
105 %service -q rpcbind stop
106 /sbin/chkconfig --del rpcbind
107fi
7a5b9a75
JR
108%systemd_preun rpcbind.service
109
c84db1a4 110%triggerpostun -- %{name} < 0.2.0-5
7a5b9a75
JR
111if [ -f /etc/sysconfig/rpcbind ]; then
112 . /etc/sysconfig/rpcbind
113 [ "$RPCBIND_VERBOSE" == "no" ] || RPCBIND_OPTIONS="-l"
114 [ "$RPCBIND_INSECURE" == "yes" ] && RPCBIND_OPTIONS="$RPCBIND_OPTIONS -i"
115 for a in $RPCBIND_ADDRESSES ; do
116 RPCBIND_OPTIONS="$RPCBIND_OPTIONS -h $a"
117 done
118 [ -z "$RPCBIND_OPTIONS" ] && exit 0
a5609ebb 119 %{__cp} -f /etc/sysconfig/rpcbind /etc/sysconfig/rpcbind.rpmsave
8fdb0aee
JR
120 echo >>/etc/sysconfig/rpcbind
121 echo "# Added by rpm trigger" >>/etc/sysconfig/rpcbind
7a5b9a75
JR
122 echo "RPCBIND_OPTIONS=\"$RPCBIND_OPTIONS\"" >> /etc/sysconfig/rpcbind
123fi
c84db1a4 124%systemd_trigger rpcbind.service
7a5b9a75 125
ab1fd8f8
JR
126%files
127%defattr(644,root,root,755)
128%doc AUTHORS ChangeLog NEWS README
129%attr(754,root,root) /etc/rc.d/init.d/rpcbind
130%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpcbind
131%attr(755,root,root) /sbin/*
132%attr(755,root,root) %{_sbindir}/*
133%{_mandir}/man8/*.8*
134%dir %attr(700,rpc,root) %{_var}/lib/%{name}
7a5b9a75
JR
135%{systemdunitdir}/rpcbind.service
136%{systemdunitdir}/rpcbind.socket
This page took 0.091495 seconds and 4 git commands to generate.