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