]> git.decadent.org.uk Git - nfs-utils.git/blob - nfs-utils.spec
new "mountpoint" export option.
[nfs-utils.git] / nfs-utils.spec
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: 1.0.3
10 Release: 1
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/etc/sysconfig
57 mkdir -p $RPM_BUILD_ROOT/var/lib/nfs
58 make install_prefix=$RPM_BUILD_ROOT MANDIR=$RPM_BUILD_ROOT%{_mandir} SBINDIR=$RPM_BUILD_ROOT%{_prefix}/sbin install
59 install -s -m 755 tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT/sbin
60 install -m 755 etc/redhat/nfs.init $RPM_BUILD_ROOT/etc/rc.d/init.d/nfs
61 install -m 755 etc/redhat/nfs $RPM_BUILD_ROOT/etc/sysconfig/nfs
62 install -m 755 etc/redhat/nfslock.init $RPM_BUILD_ROOT/etc/rc.d/init.d/nfslock
63 touch $RPM_BUILD_ROOT/var/lib/nfs/rmtab
64 mv $RPM_BUILD_ROOT/usr/sbin/{rpc.lockd,rpc.statd} $RPM_BUILD_ROOT/sbin
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 /sbin/chkconfig --add nfs
71 /sbin/chkconfig --add nfslock
72
73 %preun
74 if [ "$1" = "0" ]; then
75     /sbin/chkconfig --del nfs
76     /sbin/chkconfig --del nfslock
77 fi
78
79 %triggerpostun -- nfs-server
80 /sbin/chkconfig --add nfs
81
82 %triggerpostun -- knfsd
83 /sbin/chkconfig --add nfs
84
85 %triggerpostun -- knfsd-clients
86 /sbin/chkconfig --add nfslock
87
88 %files
89 %defattr(-,root,root)
90 %config /etc/rc.d/init.d/nfs
91 %dir /var/lib/nfs
92 %config(noreplace) /etc/sysconfig/nfs
93 %config(noreplace) /var/lib/nfs/xtab
94 %config(noreplace) /var/lib/nfs/etab
95 %config(noreplace) /var/lib/nfs/rmtab
96 /sbin/rpcdebug
97 /sbin/rpc.lockd
98 /sbin/rpc.statd
99 /usr/sbin/exportfs
100 /usr/sbin/nfsstat
101 /usr/sbin/nhfsstone
102 /usr/sbin/rpc.mountd
103 /usr/sbin/rpc.nfsd
104 %if %{rquotad}
105 /usr/sbin/rpc.rquotad
106 %endif
107 /usr/sbin/showmount
108 %{_mandir}/man?/*
109 %config /etc/rc.d/init.d/nfslock
110 %doc README ChangeLog COPYING