]> git.pld-linux.org Git - packages/rpcbind.git/blob - rpcbind.spec
- added systemd package
[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.0
5 Release:        3.1
6 License:        GPL
7 Group:          Daemons
8 Source0:        http://dl.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
9 # Source0-md5:  1a77ddb1aaea8099ab19c351eeb26316
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}-usage.patch
18 Patch4:         %{name}-SO_REUSEADDR.patch
19 Patch5:         %{name}-nofork.patch
20 Patch6:         %{name}-tcp-addrs.patch
21 # http://nfsv4.bullopensource.org/doc/tirpc_rpcbind.php
22 URL:            http://sourceforge.net/projects/rpcbind/
23 BuildRequires:  autoconf
24 BuildRequires:  automake
25 BuildRequires:  libtirpc-devel >= 1:0.1.10
26 BuildRequires:  libtool
27 BuildRequires:  libwrap-devel
28 BuildRequires:  rpmbuild(macros) >= 1.623
29 Requires(post,preun):   /sbin/chkconfig
30 Requires:       /sbin/chkconfig
31 Requires:       rc-scripts >= 0.4.1.6
32 Provides:       portmap = 8.0
33 Provides:       user(rpc)
34 Obsoletes:      portmap
35 Conflicts:      clusternfs < 3.0-0.rc2.3
36 Conflicts:      flixengine < 8.0.8.2-1
37 Conflicts:      nfs-utils < 1.1.0-0.rc2.1
38 Conflicts:      quota-rquotad < 1:3.14-4
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
42 The rpcbind utility is a server that converts RPC program numbers into
43 universal addresses. It must be running on the host to be able to make
44 RPC calls on a server on that machine.
45
46 %description -l pl.UTF-8
47 Narzędzie rpcbind to serwer konwertujący numery programów RPC na
48 adresy uniwersalne. Musi działać na maszynie, aby można było wykonywać
49 wywołania RPC na serwerze na tej maszynie.
50
51 %package systemd
52 Summary:        systemd units for rpcbind
53 Summary(pl.UTF-8):      Jednostki systemd dla demona rpcbind
54 Group:          Daemons
55 Requires:       %{name} = %{version}-%{release}
56 Requires:       systemd
57 Requires:       systemd-units
58
59 %description systemd
60 systemd units for rpcbind.
61
62 %description systemd -l pl.UTF-8
63 Jednostki systemd dla demona rpcbind.
64
65 %prep
66 %setup -q
67 %patch0 -p1
68 %patch1 -p1
69 %patch2 -p1
70 %patch3 -p1
71 %patch4 -p1
72 %patch5 -p1
73 %patch6 -p1
74
75 %build
76 %{__libtoolize}
77 %{__aclocal}
78 %{__autoheader}
79 %{__autoconf}
80 %{__automake}
81 %configure \
82         --enable-libwrap \
83         --enable-warmstarts \
84         --with-statedir=/var/lib/rpcbind \
85         --with-rpcuser=rpc
86 %{__make}
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
91         $RPM_BUILD_ROOT{%{_mandir}/man8,%{_var}/lib/%{name},%{systemdunitdir}}
92
93 install src/rpcbind $RPM_BUILD_ROOT/sbin
94 install src/rpcinfo $RPM_BUILD_ROOT%{_sbindir}
95
96 install man/{rpcbind,rpcinfo}.8 $RPM_BUILD_ROOT%{_mandir}/man8
97
98 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpcbind
99 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rpcbind
100
101 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/rpcbind.service
102 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/rpcbind.socket
103
104 %clean
105 rm -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
115 if [ "$1" = "0" ]; then
116         %userremove rpc
117 fi
118
119 %preun
120 if [ "$1" = "0" ]; then
121         %service -q rpcbind stop
122         /sbin/chkconfig --del rpcbind
123 fi
124
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
135 if [ -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
144         echo "RPCBIND_OPTIONS=\"$RPCBIND_OPTIONS\"" >> /etc/sysconfig/rpcbind
145 fi
146
147 %files
148 %defattr(644,root,root,755)
149 %doc AUTHORS ChangeLog NEWS README
150 %attr(754,root,root) /etc/rc.d/init.d/rpcbind
151 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpcbind
152 %attr(755,root,root) /sbin/*
153 %attr(755,root,root) %{_sbindir}/*
154 %{_mandir}/man8/*.8*
155 %dir %attr(700,rpc,root) %{_var}/lib/%{name}
156
157 %files systemd
158 %defattr(644,root,root,755)
159 %{systemdunitdir}/rpcbind.service
160 %{systemdunitdir}/rpcbind.socket
This page took 0.075916 seconds and 3 git commands to generate.