]> git.decadent.org.uk Git - nfs-utils.git/blob - nfs-utils.spec
d714cb1497617f04621f6d4b7ca25c777b605b30
[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: 4
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 %if %{_target_cpu} != %{_build_cpu}
39 CC=%{__cc}; export CC
40 CXX=%{__cxx}; export CXX
41 BUILD_CC=gcc; export BUILD_CC
42 %configure --build=%{__build_alias}
43 %else
44 %configure
45 %endif
46 make all
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 mkdir -p $RPM_BUILD_ROOT/{/sbin,/usr/sbin}
51 mkdir -p $RPM_BUILD_ROOT%{_mandir}/{man5,man8}
52 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
53 mkdir -p $RPM_BUILD_ROOT/var/lib/nfs
54 make install_prefix=$RPM_BUILD_ROOT MANDIR=$RPM_BUILD_ROOT%{_mandir} SBINDIR=$RPM_BUILD_ROOT%{_prefix}/sbin install
55 install -s -m 755 tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT/sbin
56 install -m 755 etc/redhat/nfs.init $RPM_BUILD_ROOT/etc/rc.d/init.d/nfs
57 install -m 755 etc/redhat/nfslock.init $RPM_BUILD_ROOT/etc/rc.d/init.d/nfslock
58 touch $RPM_BUILD_ROOT/var/lib/nfs/rmtab
59 mv $RPM_BUILD_ROOT/usr/sbin/{rpc.lockd,rpc.statd} $RPM_BUILD_ROOT/sbin
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %post
65 /sbin/chkconfig --add nfs
66 /sbin/chkconfig --add nfslock
67
68 %preun
69 if [ "$1" = "0" ]; then
70     /sbin/chkconfig --del nfs
71     /sbin/chkconfig --del nfslock
72 fi
73
74 %triggerpostun -- nfs-server
75 /sbin/chkconfig --add nfs
76
77 %triggerpostun -- knfsd
78 /sbin/chkconfig --add nfs
79
80 %triggerpostun -- knfsd-clients
81 /sbin/chkconfig --add nfslock
82
83 %files
84 %defattr(-,root,root)
85 %config /etc/rc.d/init.d/nfs
86 %dir /var/lib/nfs
87 %config(noreplace) /var/lib/nfs/xtab
88 %config(noreplace) /var/lib/nfs/etab
89 %config(noreplace) /var/lib/nfs/rmtab
90 /sbin/rpcdebug
91 /sbin/rpc.lockd
92 /sbin/rpc.statd
93 /usr/sbin/exportfs
94 /usr/sbin/nfsstat
95 /usr/sbin/nhfsstone
96 /usr/sbin/rpc.mountd
97 /usr/sbin/rpc.nfsd
98 /usr/sbin/rpc.rquotad
99 /usr/sbin/showmount
100 %{_mandir}/man?/*
101 %config /etc/rc.d/init.d/nfslock
102 %doc README ChangeLog COPYING