Getting ready for release of 1.9.17.
[samba.git] / examples / redhat / samba-RH40.spec
1 Summary: SMB client and server
2 Name: samba
3 Version: RH303-1.9.17a3
4 Release: 1
5 Copyright: GPL
6 Group: Networking
7 Source: ftp://samba.anu.edu.au/pub/samba/samba-latest.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 cd ..
38 for i in nmblookup smbclient smbpasswd smbrun smbstatus testparm testprns
39 do
40 install -m755 -s -g0 -o0 source/$i /usr/bin
41 done
42
43 for i in addtosmbpass mksmbpasswd.sh smbtar 
44 do
45 install -m755 -g0 -o0 source/$i /usr/bin
46 done
47
48 for i in smbd nmbd
49 do
50 install -m755 -s -g0 -o0 source/$i /usr/sbin
51 done
52
53 for i in smbclient.1 smbrun.1 smbstatus.1 smbtar.1 testparm.1 testprns.1
54 do
55 install -m644 -g0 -o0 docs/$i /usr/man/man1
56 done
57
58 install -m644 -g0 -o0 docs/smb.conf.5 /usr/man/man5
59 install -m644 -g0 -o0 docs/samba.7 /usr/man/man7
60 install -m644 -g0 -o0 docs/smbd.8 /usr/man/man8
61 install -m644 -g0 -o0 docs/nmbd.8 /usr/man/man8
62 install -m644 -g0 -o0 examples/simple/smb.conf /etc/smb.conf.sampl
63 install -m644 -g0 -o0 examples/redhat/smb.conf /etc/smb.conf
64 install -m644 -g0 -o0 examples/redhat/smbprint /usr/bin
65 install -m755 -g0 -o0 examples/redhat/smb.init /etc/rc.d/init.d/smb
66 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc3.d/S91smb
67 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc0.d/K35smb
68 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc6.d/K35smb
69 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc1.d/K35smb
70 mkdir -p /home/samba
71 mkdir -p /var/lock/samba
72 chown root.nobody /home/samba
73 chmod 775 /home/samba
74 install -m 644 -g0 -o0 examples/redhat/samba.log /etc/logrotate.d/samba
75
76 %post
77 /sbin/pamconfig --add --service=samba --password=none --sesslist=none
78
79 if [ ! -f /var/log/samba ]; then
80         touch /var/log/samba
81         chmod 600 /var/log/samba
82 fi
83
84 %postun
85 if [ "$1" = 0 ] ; then
86   /sbin/pamconfig --remove --service=samba --password=none --sesslist=none
87 fi
88
89 %files
90 %doc docs/*.txt docs/INSTALL.sambatar docs/MIRRORS docs/PROJECTS 
91 %doc docs/README.DCEDFS docs/README.jis docs/README.sambatar 
92 %doc docs/SMBTAR.notes docs/THANKS docs/announce docs/history
93 %doc docs/samba.faq docs/samba.lsm docs/wfw_slip.htm 
94 %doc examples
95 /usr/sbin/smbd
96 /usr/bin/addtosmbpass
97 /usr/bin/mksmbpasswd.sh
98 /usr/bin/smbclient
99 /usr/sbin/nmbd
100 /usr/bin/testparm
101 /usr/bin/testprns
102 /usr/bin/smbrun
103 /usr/bin/smbstatus
104 /usr/bin/nmblookup
105 /usr/bin/smbpasswd
106 /usr/bin/smbtar
107 /usr/bin/smbprint
108 %config /etc/smb.conf
109 %config /etc/smb.conf.sampl
110 %config /etc/rc.d/init.d/smb
111 %config /etc/rc.d/rc3.d/S91smb
112 %config /etc/rc.d/rc0.d/K35smb
113 %config /etc/rc.d/rc1.d/K35smb
114 %config /etc/rc.d/rc6.d/K35smb
115 %config /etc/logrotate.d/samba
116 /usr/man/man1/smbstatus.1
117 /usr/man/man1/smbclient.1
118 /usr/man/man1/smbrun.1
119 /usr/man/man1/smbtar.1
120 /usr/man/man1/testparm.1
121 /usr/man/man1/testprns.1
122 /usr/man/man5/smb.conf.5
123 /usr/man/man7/samba.7
124 /usr/man/man8/smbd.8
125 /usr/man/man8/nmbd.8
126 %dir /home/samba
127 %dir /var/lock/samba