f4bf06b415ac102ea5f268646af06a80a467ffc7
[nfs-utils.git] / nfs-utils.spec
1 Summary: The utilities for Linux NFS client and server.
2 Name: nfs-utils
3 Version: 0.1.1
4 Release: 1
5 Source0: ftp://ftp.valinux.com/pub/support/hjl/nfs/%{name}-%{version}.tar.gz
6 Group: System Environment/Daemons
7 Obsoletes: nfs-server nfs-server-clients knfsd knfsd-clients knfsd-lock
8 Provides: nfs-server nfs-server-clients knfsd knfsd-clients knfsd-lock
9 Copyright: GPL
10 ExcludeArch: armv4l
11 Buildroot: /var/tmp/%{name}-root
12 Serial: 1
13 Requires: kernel >= 2.2.5, portmap >= 4.0
14
15 %description
16 The nfs-utils package provides the utilities for Linux NFS client and
17 server.
18
19 %prep
20 %setup -q
21
22 %build
23 ./configure
24 make all
25
26 %install
27 rm -rf $RPM_BUILD_ROOT
28 mkdir -p $RPM_BUILD_ROOT{/sbin,/usr/{sbin,man/man5,man/man8}}
29 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
30 mkdir -p $RPM_BUILD_ROOT/dev
31
32 make install install_prefix=$RPM_BUILD_ROOT
33 install -s -m 755 tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT/sbin
34 install -m 755 etc/redhat/nfsd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/nfs
35 install -m 755 etc/redhat/nfslock.init $RPM_BUILD_ROOT/etc/rc.d/init.d/nfslock
36
37 %clean
38 rm -rf $RPM_BUILD_ROOT
39
40 %post
41 /sbin/chkconfig --add nfs
42 /sbin/chkconfig --add nfslock
43
44 %preun
45 if [ "$1" = "0" ]; then
46     /sbin/chkconfig --del nfs
47     /sbin/chkconfig --del nfslock
48 fi
49
50 %files
51 %defattr(-,root,root)
52 /sbin/rpcdebug
53 /usr/sbin/exportfs
54 /usr/sbin/nfsstat
55 /usr/sbin/nhfsstone
56 /usr/sbin/rpc.lockd
57 /usr/sbin/rpc.mountd
58 /usr/sbin/rpc.nfsd
59 /usr/sbin/rpc.rquotad
60 /usr/sbin/rpc.statd
61 /usr/sbin/showmount
62 /usr/man/man5/exports.5
63 /usr/man/man8/exportfs.8
64 /usr/man/man8/mountd.8
65 /usr/man/man8/nfsd.8
66 /usr/man/man8/nfsstat.8
67 /usr/man/man8/rpc.mountd.8
68 /usr/man/man8/rpc.nfsd.8
69 /usr/man/man8/rpc.statd.8
70 /usr/man/man8/rpc.rquotad.8
71 /usr/man/man8/rquotad.8
72 /usr/man/man8/showmount.8
73 /usr/man/man8/statd.8
74 %config /etc/rc.d/init.d/nfs
75 %config /etc/rc.d/init.d/nfslock
76 %dir /var/lib/nfs
77 %config(noreplace) /var/lib/nfs/xtab
78 %config(noreplace) /var/lib/nfs/etab
79 %config(noreplace) /var/lib/nfs/rmtab
80 %doc README