]> git.pld-linux.org Git - packages/nfs-utils.git/blob - nfs-utils.spec
- added post/preun scripts to rquotad package
[packages/nfs-utils.git] / nfs-utils.spec
1 Name:           nfs-utils
2 Version:        0.1.3
3 Release:        2
4 Summary:        Kernel NFS server.
5 Summary(pl):    Dzia³aj±cy na poziomie j±dra serwer NFS.
6 Source0:        ftp://ftp.linuxnfs.sourceforge.org/pub/nfs/%{name}-%{version}.tar.gz
7 Source1:        ftp://ftp.linuxnfs.sourceforge.org/pub/nfs/nfs.doc.tar.gz
8 Source2:        nfs.init
9 Source3:        nfslock.init
10 Source4:        rquotad.init
11 Source5:        nfs.sysconfig
12 Source6:        nfslock.sysconfig
13 Source7:        rquotad.sysconfig
14 Patch0:         nfs-utils-paths.patch
15 Patch1:         nfs-utils-rquotad.patch
16 #Requires:      kernel >= 2.2.5
17 Requires:       portmap >= 4.0
18 Group:          Networking/Daemons
19 Group(pl):      Sieciowe/Serwery
20 Obsoletes:      nfsdaemon nfs-server knfsd
21 Provides:       nfsdaemon
22 Requires:       rc-scripts
23 Copyright:      GPL
24 #Requires:      /dev/nfsd_netlink
25 BuildRoot:      /tmp/%{name}-%{version}-root
26 ExcludeArch:    armv4l
27
28 %description
29 This is the *new* kernel NFS server and related tools.  It provides a much
30 higher level of performance than the traditional Linux user-land NFS server.
31
32 %description -l pl
33 To jest *nowy* dzia³aj±cy na poziomie j±dra serwer NFS oraz zwi±zane
34 z nim narzêdzia. Serwer ten dostarcza znacznie wiêksz± wydajno¶æ
35 ni¿ tradycyjny, dzia³aj±cy na poziomie urzytkownika serwer NFS.
36
37 %package clients
38 Obsoletes:      nfs-server-clients
39 Provides:       nfs-server-clients
40 Summary:        Clients for connecting to a remote NFS server.
41 Summary(pl):    Klienci do ³±czenia siê ze zdalnym serwerem NFS.
42 Group:          Networking
43 Group(pl):      Sieciowe
44 Obsoletes:      nfsclient nfs-server-clients knfsd-clients
45 Provides:       nfsclient
46
47 %description clients
48 The nfs-server-clients package contains the showmount program.
49 Showmount queries the mount daemon on a remote host for information
50 about the NFS (Network File System) server on the remote host.  For
51 example, showmount can display the clients which are mounted on that
52 host.  This package is not needed to mount NFS volumes.
53
54 %description -l pl clients
55 Pakiet zawiera program showmount s³u¿±cy do odpytywania
56 serwera NFS.
57
58 %package lock
59 Summary:        Programs for NFS file locking.
60 Summary(pl):    Programy do obs³ugi blokowania plików poprzez NFS (lock).
61 #Requires:      kernel >= 2.2.5
62 Requires:       portmap >= 4.0
63 Requires:       %{name} = %{version}
64 Obsoletes:      nfslockd knfsd-lock
65 Provides:       nfslockd
66 Group:          Networking
67 Group(pl):      Sieciowe
68
69 %description lock
70 The nfs-lock pacage contains programs which support the NFS file lock.
71 Install nfs-lock if you want to use file lock over NFS.
72
73 %description -l pl lock
74 Ten pakiet zawiera programy umo¿liwiaj±ce wykonywanie
75 blokowania plików (file locking) poprzez NFS.
76
77 %package rquotad
78 Summary:        Remote quota server.
79 Summary(pl):    Zdalny serwer quota.
80 Group:          Networking/Daemons
81 Group(pl):      Sieciowe/Serwery
82
83 %description rquotad
84 rquotad is an rpc(3N) server which returns quotas for a user of a local file system which
85 is mounted by a remote machine over the NFS. The results are used by quota(1) to display
86 user quotas for remote file systems. 
87
88 %description -l pl rquotad
89 Zdalny serwer quota.
90
91 %prep
92 %setup  -q -a1
93 %patch0 -p1
94 %patch1 -p1
95
96 %build
97 %configure \
98         --with-statedir=/var/state/nfs \
99         --enable-nfsv3 \
100         --enable-secure-statd
101 make all
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}}
107 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_var}/state/nfs}
108
109 make install install_prefix="$RPM_BUILD_ROOT"
110
111 install -s tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT/sbin
112 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfs
113 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfslock
114 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/rquotad
115 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/nfsd
116 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/nfslock
117 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/rquotad
118 touch $RPM_BUILD_ROOT/%{_var}/state/nfs/rmtab
119
120 touch $RPM_BUILD_ROOT/etc/exports
121
122 rm $RPM_BUILD_ROOT%{_mandir}/man8/rpc.{mountd,nfsd,rquotad,statd}.8
123 echo ".so mountd.8"  >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.mountd.8
124 echo ".so nfsd.8"    >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.nfsd.8
125 echo ".so rquotad.8" >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.rquotad.8
126 echo ".so statd.8"   >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.statd.8
127
128 strip --strip-unneeded $RPM_BUILD_ROOT{/sbin/*,%{_sbindir}/*} || :
129
130 touch $RPM_BUILD_ROOT/var/state/nfs/xtab
131
132 gzip -9nf ChangeLog README nfs/*.ps \
133         $RPM_BUILD_ROOT%{_mandir}/man*/*
134
135 mv -f nfs/*.ps.gz ./
136 mv -f nfs html
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %post
142 /sbin/chkconfig --add nfs
143 if [ -r /var/lock/subsys/nfs ]; then
144         /etc/rc.d/init.d/nfs restart >&2
145 else
146         echo "Run \"/etc/rc.d/init.d/nfs start\" to start nfs daemon."
147 fi
148 sed -e 's/NFSDTYPE=.*/NFSDTYPE=K/' /etc/sysconfig/nfsd > /etc/sysconfig/nfsd.new
149 mv -f /etc/sysconfig/nfsd.new /etc/sysconfig/nfsd
150
151 %preun
152 if [ "$1" = "0" ]; then
153         /sbin/chkconfig --del nfs
154         /etc/rc.d/init.d/nfs stop >&2
155 fi
156
157 %post lock
158 /sbin/chkconfig --add nfslock
159 if [ -r /var/lock/subsys/nfslock ]; then
160         /etc/rc.d/init.d/nfslock restart >&2
161 else
162         echo "Run \"/etc/rc.d/init.d/nfslock start\" to start nfslock daemon."
163 fi
164
165 %preun lock
166 if [ "$1" = "0" ]; then
167         /sbin/chkconfig --del nfslock
168         /etc/rc.d/init.d/nfslock stop >&2
169 fi
170
171 %post rquotad
172 /sbin/chkconfig --add rquotad
173 if [ -r /var/lock/subsys/rquotad ]; then
174         /etc/rc.d/init.d/rquotad restart >&2
175 else
176         echo "Run \"/etc/rc.d/init.d/rquotad start\" to start quota daemon."
177 fi
178
179 %preun rquotad
180 if [ "$1" = "0" ]; then
181         /sbin/chkconfig --del rquotad
182         /etc/rc.d/init.d/rquotad stop >&2
183 fi
184
185 %files
186 %defattr(644,root,root,755)
187 %doc {ChangeLog,README,*.ps}.gz html
188 %attr(755,root,root) /sbin/rpcdebug
189 %attr(755,root,root) %{_sbindir}/exportfs
190 %attr(755,root,root) %{_sbindir}/rpc.mountd
191 %attr(755,root,root) %{_sbindir}/rpc.nfsd
192 %attr(755,root,root) %{_sbindir}/nfsstat
193 %attr(755,root,root) %{_sbindir}/nhfsstone
194
195 %attr(754,root,root) /etc/rc.d/init.d/nfs
196
197 %attr(755,root,root) %dir %{_var}/state/nfs
198
199 %config(noreplace) %verify(not size mtime md5) /etc/exports
200 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/nfsd
201 %config(noreplace) %verify(not size mtime md5) %{_var}/state/nfs/xtab
202 %config(noreplace) %verify(not size mtime md5) %{_var}/state/nfs/etab
203 %config(noreplace) %verify(not size mtime md5) %{_var}/state/nfs/rmtab
204
205 %{_mandir}/man8/exportfs.8*
206 %{_mandir}/man8/mountd.8*
207 %{_mandir}/man8/nfsd.8*
208 %{_mandir}/man8/nfsstat.8*
209 %{_mandir}/man8/rpc.mountd.8*
210 %{_mandir}/man8/rpc.nfsd.8*
211 %{_mandir}/man5/exports.5*
212
213 %files lock
214 %defattr(644,root,root,755)
215 %attr(755,root,root) %{_sbindir}/rpc.lockd
216 %attr(755,root,root) %{_sbindir}/rpc.statd
217 %attr(754,root,root) /etc/rc.d/init.d/nfslock
218 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/nfslock
219
220 %{_mandir}/man8/rpc.statd.8*
221 %{_mandir}/man8/statd.8*
222
223 %files clients
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_sbindir}/showmount
226 %{_mandir}/man8/showmount.8*
227
228 %files rquotad
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_sbindir}/rpc.rquotad
231 %{_mandir}/man8/rpc.rquotad.8*
232 %attr(754,root,root) /etc/rc.d/init.d/rquotad
233 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rquotad
This page took 0.039741 seconds and 3 git commands to generate.