7c8e3f9f8cb8e68167e8ac70f714a010c53b34a0
[samba.git] / examples / redhat / samba-RH303.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-make303.patch
9 Patch2: samba-axp.patch
10 Packager: John H Terpstra [Samba-Team] <jht@aquasoft.com.au>
11
12 %description
13 Samba provides an SMB server which can be used to provide network
14 services to SMB (sometimes called "Lan Manager") clients, including
15 various versions of MS Windows, OS/2, and other Linux machines.
16
17 Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT need
18 NetBEUI (Microsoft Raw NetBIOS frame) protocol.
19
20 %prep
21 %setup
22 %patch -p1
23
24 %ifarch axp
25 %patch2 -p1
26 %endif
27
28 %build
29 cd source
30 make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
31
32 %install
33 cd source
34 cd ..
35 for i in nmblookup smbclient smbpasswd smbrun smbstatus testparm testprns
36 do
37 install -m755 -s -g0 -o0 source/$i /usr/bin
38 done
39
40 for i in addtosmbpass mksmbpasswd.sh smbtar 
41 do
42 install -m755 -g0 -o0 source/$i /usr/bin
43 done
44
45 for i in smbd nmbd
46 do
47 install -m755 -s -g0 -o0 source/$i /usr/sbin
48 done
49
50 for i in smbclient.1 smbrun.1 smbstatus.1 smbtar.1 testparm.1 testprns.1
51 do
52 install -m644 -g0 -o0 docs/$i /usr/man/man1
53 done
54
55 install -m644 -g0 -o0 docs/smb.conf.5 /usr/man/man5
56 install -m644 -g0 -o0 docs/samba.7 /usr/man/man7
57 install -m644 -g0 -o0 docs/smbd.8 /usr/man/man8
58 install -m644 -g0 -o0 docs/nmbd.8 /usr/man/man8
59 install -m644 -g0 -o0 examples/simple/smb.conf /etc/smb.conf.sampl
60 install -m644 -g0 -o0 examples/redhat/smb.conf /etc/smb.conf
61 install -m644 -g0 -o0 examples/redhat/smbprint /usr/bin
62 install -m755 -g0 -o0 examples/redhat/smb.init /etc/rc.d/init.d/smb
63 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc3.d/S91smb
64 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc0.d/K35smb
65 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc6.d/K35smb
66 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc1.d/K35smb
67 mkdir -p /home/samba
68 mkdir -p /var/lock/samba
69 chown root.nobody /home/samba
70 chmod 775 /home/samba
71 install -m 644 -g0 -o0 examples/redhat/samba.log /etc/logrotate.d/samba
72
73 %post
74 /sbin/pamconfig --add --service=samba --password=none --sesslist=none
75
76 if [ ! -f /var/log/samba ]; then
77         touch /var/log/samba
78         chmod 600 /var/log/samba
79 fi
80
81 %postun
82 if [ "$1" = 0 ] ; then
83   /sbin/pamconfig --remove --service=samba --password=none --sesslist=none
84 fi
85
86 %files
87 %doc docs/*.txt docs/INSTALL.sambatar docs/MIRRORS docs/PROJECTS 
88 %doc docs/README.DCEDFS docs/README.jis docs/README.sambatar 
89 %doc docs/SMBTAR.notes docs/THANKS docs/announce docs/history
90 %doc docs/samba.faq docs/samba.lsm docs/wfw_slip.htm 
91 %doc examples
92 /usr/sbin/smbd
93 /usr/bin/addtosmbpass
94 /usr/bin/mksmbpasswd.sh
95 /usr/bin/smbclient
96 /usr/sbin/nmbd
97 /usr/bin/testparm
98 /usr/bin/testprns
99 /usr/bin/smbrun
100 /usr/bin/smbstatus
101 /usr/bin/nmblookup
102 /usr/bin/smbpasswd
103 /usr/bin/smbtar
104 /usr/bin/smbprint
105 %config /etc/smb.conf
106 %config /etc/smb.conf.sampl
107 %config /etc/rc.d/init.d/smb
108 %config /etc/rc.d/rc3.d/S91smb
109 %config /etc/rc.d/rc0.d/K35smb
110 %config /etc/rc.d/rc1.d/K35smb
111 %config /etc/rc.d/rc6.d/K35smb
112 %config /etc/logrotate.d/samba
113 /usr/man/man1/smbstatus.1
114 /usr/man/man1/smbclient.1
115 /usr/man/man1/smbrun.1
116 /usr/man/man1/smbtar.1
117 /usr/man/man1/testparm.1
118 /usr/man/man1/testprns.1
119 /usr/man/man5/smb.conf.5
120 /usr/man/man7/samba.7
121 /usr/man/man8/smbd.8
122 /usr/man/man8/nmbd.8
123 %dir /home/samba
124 %dir /var/lock/samba