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