b65e4481687e8a1ecb62199b685852f2e0e6b8df
[samba.git] / examples / redhat / samba-1.9.16p10.spec
1 Summary: SMB client and server
2 Name: samba
3 Version: 1.9.16p10
4 Release: 1
5 Copyright: GPL
6 Group: Networking
7 Source: ftp://samba.anu.edu.au/pub/samba/samba-1.9.16p10.tar.gz
8 Patch: samba-make.patch
9 Patch2: samba-axp.patch
10 Packager: John H Terpstra [Samba-Team] <jht@aquasoft.com.au>
11 Requires: pamconfig
12
13 %description
14 Samba provides an SMB server which can be used to provide network
15 services to SMB (sometimes called "Lan Manager") clients, including
16 various versions of MS Windows, OS/2, and other Linux machines.
17 Samba also provides some SMB clients, which complement the built-in
18 SMB filesystem in Linux.
19
20 Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT need
21 NetBEUI (Microsoft Raw NetBIOS frame) protocol.
22
23 %prep
24 %setup
25 %patch -p1
26
27 %ifarch axp
28 %patch2 -p1
29 %endif
30
31 %build
32 cd source
33 make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
34
35 %install
36 cd source
37 make install
38 cd ..
39 install -m644 examples/simple/smb.conf /etc/smb.conf.sampl
40 install -m644 examples/redhat/smb.conf /etc/smb.conf
41 install -m755 examples/redhat/smb.init /etc/rc.d/init.d/smb
42 ln -sf ../init.d/smb /etc/rc.d/rc3.d/S91smb
43 ln -sf ../init.d/smb /etc/rc.d/rc0.d/K35smb
44 ln -sf ../init.d/smb /etc/rc.d/rc6.d/K35smb
45 ln -sf ../init.d/smb /etc/rc.d/rc1.d/K35smb
46 mkdir -p /home/samba
47 mkdir -p /var/log/samba
48 chown root.nobody /home/samba
49 chmod 775 /home/samba
50
51 strip /usr/sbin/smbd /usr/bin/smbclient /usr/sbin/nmbd /usr/bin/testparm \
52         /usr/bin/testprns /usr/bin/smbrun /usr/bin/smbstatus \
53         /usr/bin/nmblookup /usr/bin/smbpasswd
54
55 %post
56 /sbin/pamconfig --add --service=samba --password=none --sesslist=none
57
58 %postun
59 if [ "$1" = 0 ] ; then
60   /sbin/pamconfig --remove --service=samba --password=none --sesslist=none
61 fi
62
63 %files
64 %doc docs/*.txt docs/INSTALL.sambatar docs/MIRRORS docs/PROJECTS 
65 %doc docs/README.DCEDFS docs/README.jis docs/README.sambatar 
66 %doc docs/SMBTAR.notes docs/THANKS docs/announce docs/history
67 %doc docs/samba.faq docs/samba.lsm docs/wfw_slip.htm 
68 %doc examples
69 /usr/sbin/smbd
70 /usr/bin/smbclient
71 /usr/sbin/nmbd
72 /usr/bin/testparm
73 /usr/bin/testprns
74 /usr/bin/smbrun
75 /usr/bin/smbstatus
76 /usr/bin/nmblookup
77 /usr/bin/smbpasswd
78 %config /etc/smb.conf
79 /etc/smb.conf.sampl
80 /etc/rc.d/init.d/smb
81 /etc/rc.d/rc3.d/S91smb
82 /etc/rc.d/rc0.d/K35smb
83 /etc/rc.d/rc1.d/K35smb
84 /etc/rc.d/rc6.d/K35smb
85 /usr/man/man1/smbstatus.1
86 /usr/man/man1/smbclient.1
87 /usr/man/man1/smbrun.1
88 /usr/man/man1/testparm.1
89 /usr/man/man1/testprns.1
90 /usr/man/man5/smb.conf.5
91 /usr/man/man7/samba.7
92 /usr/man/man8/smbd.8
93 /usr/man/man8/nmbd.8
94 %dir /home/samba
95 %dir /var/lock/samba