JHT ===> Added os level and activated max log size in standard smb.conf file.
[samba.git] / examples / redhat / samba-1.9.16p11.spec
1 Summary: SMB client and server
2 Name: samba
3 Version: 1.9.16p11
4 Release: 2
5 Copyright: GPL
6 Group: Networking
7 Source: ftp://samba.anu.edu.au/pub/samba/samba-1.9.16p11.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/lock/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 install -m 644 -o 0 -g 0 examples/redhat/samba.log /etc/logrotate.d/samba
55
56 %post
57 /sbin/pamconfig --add --service=samba --password=none --sesslist=none
58
59 if [ ! -f /var/log/samba ]; then
60         touch /var/log/samba
61         chmod 600 /var/log/samba
62 fi
63
64 %postun
65 if [ "$1" = 0 ] ; then
66   /sbin/pamconfig --remove --service=samba --password=none --sesslist=none
67 fi
68
69 %files
70 %doc docs/*.txt docs/INSTALL.sambatar docs/MIRRORS docs/PROJECTS 
71 %doc docs/README.DCEDFS docs/README.jis docs/README.sambatar 
72 %doc docs/SMBTAR.notes docs/THANKS docs/announce docs/history
73 %doc docs/samba.faq docs/samba.lsm docs/wfw_slip.htm 
74 %doc examples
75 /usr/sbin/smbd
76 /usr/bin/smbclient
77 /usr/sbin/nmbd
78 /usr/bin/testparm
79 /usr/bin/testprns
80 /usr/bin/smbrun
81 /usr/bin/smbstatus
82 /usr/bin/nmblookup
83 /usr/bin/smbpasswd
84 /usr/bin/smbtar
85 %config /etc/smb.conf
86 %config /etc/smb.conf.sampl
87 %config /etc/rc.d/init.d/smb
88 %config /etc/rc.d/rc3.d/S91smb
89 %config /etc/rc.d/rc0.d/K35smb
90 %config /etc/rc.d/rc1.d/K35smb
91 %config /etc/rc.d/rc6.d/K35smb
92 %config /etc/logrotate.d/samba
93 /usr/man/man1/smbstatus.1
94 /usr/man/man1/smbclient.1
95 /usr/man/man1/smbrun.1
96 /usr/man/man1/smbtar.1
97 /usr/man/man1/testparm.1
98 /usr/man/man1/testprns.1
99 /usr/man/man5/smb.conf.5
100 /usr/man/man7/samba.7
101 /usr/man/man8/smbd.8
102 /usr/man/man8/nmbd.8
103 %dir /home/samba
104 %dir /var/lock/samba