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