]> git.decadent.org.uk Git - nfs-utils.git/blob - nfs-utils.spec.in
3a3d65f2bfe702f4d6917470741af1c2df9fd8e5
[nfs-utils.git] / nfs-utils.spec.in
1 %define rquotad 0
2 %{?do_rquotad:%define rquotad 1}
3
4 # We don't use libtool. 
5 %define __libtoolize :
6
7 Summary: NFS utlilities and supporting daemons for the kernel NFS server.
8 Name: nfs-utils
9 Version: @VERSION@
10 Release: @RELEASE@
11 Source0: ftp://nfs.sourceforge.net/pub/nfs/%{name}-%{version}.tar.gz
12 Group: System Environment/Daemons
13 Obsoletes: nfs-server
14 Obsoletes: knfsd
15 Obsoletes: knfsd-clients
16 Obsoletes: nfs-server-clients 
17 Obsoletes: knfsd-lock
18 Provides: nfs-server 
19 Provides: nfs-server-clients 
20 Provides: knfsd-lock 
21 Provides: knfsd-clients 
22 Provides: knfsd
23 Copyright: GPL
24 Buildroot: /var/tmp/%{name}-root
25 Requires: kernel >= 2.2.7, portmap >= 4.0
26
27 %description
28 The nfs-utils package provides a daemon for the kernel NFS server and
29 related tools, which provides a much higher level of performance than the
30 traditional Linux NFS server used by most users.
31
32 This package also contains the showmount program.  Showmount queries the
33 mount daemon on a remote host for information about the NFS (Network File
34 System) server on the remote host.  For example, showmount can display the
35 clients which are mounted on that host.
36
37 %prep
38 %setup -q
39
40 %build
41 CC=%{__cc}; export CC
42 CC_FOR_BUILD=gcc; export CC_FOR_BUILD
43 %configure \
44 %if !%{rquotad}
45         --disable-rquotad \
46 %endif
47         --build=%{_build_alias}
48
49 make all
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 mkdir -p $RPM_BUILD_ROOT/{/sbin,/usr/sbin}
54 mkdir -p $RPM_BUILD_ROOT%{_mandir}/{man5,man8}
55 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
56 mkdir -p $RPM_BUILD_ROOT/var/lib/nfs
57 make install_prefix=$RPM_BUILD_ROOT MANDIR=$RPM_BUILD_ROOT%{_mandir} SBINDIR=$RPM_BUILD_ROOT%{_prefix}/sbin install
58 install -s -m 755 tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT/sbin
59 install -m 755 etc/redhat/nfs.init $RPM_BUILD_ROOT/etc/rc.d/init.d/nfs
60 install -m 755 etc/redhat/nfslock.init $RPM_BUILD_ROOT/etc/rc.d/init.d/nfslock
61 touch $RPM_BUILD_ROOT/var/lib/nfs/rmtab
62 mv $RPM_BUILD_ROOT/usr/sbin/{rpc.lockd,rpc.statd} $RPM_BUILD_ROOT/sbin
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %post
68 /sbin/chkconfig --add nfs
69 /sbin/chkconfig --add nfslock
70
71 %preun
72 if [ "$1" = "0" ]; then
73     /sbin/chkconfig --del nfs
74     /sbin/chkconfig --del nfslock
75 fi
76
77 %triggerpostun -- nfs-server
78 /sbin/chkconfig --add nfs
79
80 %triggerpostun -- knfsd
81 /sbin/chkconfig --add nfs
82
83 %triggerpostun -- knfsd-clients
84 /sbin/chkconfig --add nfslock
85
86 %files
87 %defattr(-,root,root)
88 %config /etc/rc.d/init.d/nfs
89 %dir /var/lib/nfs
90 %config(noreplace) /var/lib/nfs/xtab
91 %config(noreplace) /var/lib/nfs/etab
92 %config(noreplace) /var/lib/nfs/rmtab
93 /sbin/rpcdebug
94 /sbin/rpc.lockd
95 /sbin/rpc.statd
96 /usr/sbin/exportfs
97 /usr/sbin/nfsstat
98 /usr/sbin/nhfsstone
99 /usr/sbin/rpc.mountd
100 /usr/sbin/rpc.nfsd
101 %if %{rquotad}
102 /usr/sbin/rpc.rquotad
103 %endif
104 /usr/sbin/showmount
105 %{_mandir}/man?/*
106 %config /etc/rc.d/init.d/nfslock
107 %doc README ChangeLog COPYING