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