1 %define Version PVERSION
5 %define EtcSamba /etc/samba.d
10 Group : Server/Network
12 Summary : Samba SMB client and server.
14 Copyright : Andrew Tridgell, John H Terpstra; GPL Version 2
15 Packager : Klaus Singvogel <klaus@caldera.de>
16 Icon : Caldera-daemon.gif
17 URL : http://samba.org/samba
19 Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6
22 BuildRoot : /tmp/%{Name}-%{Version}
24 Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}%{date}.tar.gz
25 #Patch0: %{Name}-%{Version}-smbmount.patch
26 Patch1: %{Name}-%{Version}-install.patch
27 #Patch2: %{Name}-%{Version}-smbconf.patch
31 Group : Server/Network
33 Summary : Documentation on SAMBA.
37 Group : System/Network
39 Summary : Mount and unmount commands for SMB filesystems (smbfs).
43 Group : Administration/Network
44 Requires : setup >= 2.0-2, tcp_wrappers
46 Summary : Samba Web Administration Tool.
47 Samba provides an SMB server which can be used to provide
48 network services to SMB (sometimes called "Lan Manager")
49 clients, including various versions of MS Windows, OS/2,
50 and other Linux machines. Samba also provides some SMB
51 clients, which complement the built-in SMB filesystem
52 in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols
53 and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
56 Samba-2.2 features working NT Domain Control capability and
57 includes the SWAT (Samba Web Administration Tool) that
58 allows samba's smb.conf file to be remotely managed using your
59 favourite web browser. For the time being this is being
60 enabled on TCP port 901 via inetd.
62 Users are advised to use Samba-2.2 as a Windows NT4
63 Domain Controller only on networks that do NOT have a Windows
64 NT Domain Controller. This release does NOT as yet have
65 Backup Domain control ability.
67 Please refer to the WHATSNEW.txt document for fixup information.
68 This binary release includes encrypted password support.
70 Please read the smb.conf file and ENCRYPTION.txt in the
71 docs directory for implementation details.
75 NOTE: Caldera OpenLinux uses PAM which has integrated support
76 for Shadow passwordsand for quotas. Do NOT recompile with the
77 SHADOW_PWD option enabled.
80 Documentation on SAMBA.
84 This package includes the tools necessary to mount filesystems from
87 Smbmount and smbumount are an interface to the SMB filesystem. Smbfs is
88 a filesystem which understands the SMB protocol. This is the protocol
89 Windows for Workgroups, Windows NT or Lan Manager use to talk to each
90 other. It was inspired by samba, the program by Andrew Tridgell that
91 turns any unix site into a file server for DOS or Windows clients. See
92 http://samba.org/samba for this interesting program suite and lots of
93 more information on SMB and NetBIOS over TCP/IP. There you also find
94 explanation for conceps like NetBIOS name or share.
98 swat allows a Samba administrator to configure the complex smb.conf
99 file via a Web browser. In addition, a swat configuration page has
100 help links to all the configurable options in the smb.conf file
101 allowing an administrator to easily look up the effects of any change.
110 # instead of patch (to help configuration) ... ;^)
111 %{fixUP} -vbT source/Makefile.in -e '
112 s:we don.t use sbindir because we want:if you want : +
113 s:(the previous releases of Samba):$1, please use: +
114 s:(SBINDIR\s*=\s*\@)b:# ./configure --sbindir=\\\$(BINDIR)\n${1}sb: +
115 s:/log\.(\S+):/log/samba.d/${1}d: +
116 s:(PASSWD_PROGRAM\s*=\s*)(/bin):$1/usr$2: +
117 s:^(LIBS\s*=):AUTH_$1: +
118 s:((SMBD|SWAT|RPCCLIENT|SMBPASSWD)_OBJ\) )(\$\(LDF):$1\$(AUTH_LIBS) $3:
121 for i in {cvs.,change-}log; do [ ! -f ../$i ] || mv ../$i source; done
123 mv swat/help/welcome.html docs
124 %{fixUP} -vT docs -e '
125 s:/usr/local/samba/bin/(smb(client|run)):/usr/bin/$1:g +
126 s:/usr/local/samba/bin/((s|n)mbd|swat):/usr/sbin/$1:g +
127 s:/usr/local/samba/var/locks:/var/lock/samba.d: +
128 s:/usr/local/samba/(var|lib)/log:/var/log/samba.d/smb: +
129 s:/usr/local/samba/swat:/usr/share/samba/swat:g +
130 s:/usr/local/samba/lib:%{EtcSamba}:g;
132 mv docs/welcome.html swat/help
133 for i in docs/*/smb.conf.5*; do
135 s:users\.map:smbusers:g +
136 s:SAMBA_INSTALL_DIRECTORY/lib:%{EtcSamba}: +
137 s:None \(set in compile\)\.:(see above).: +
138 s:/usr/local/:/usr/:g;
141 %{fixUP} -vT docs/textdocs/Faxing.txt -e '
142 s:/usr/local/etc/:/etc/: +
143 s:/usr/local/:/usr/:;
145 %{fixUP} -vT docs/textdocs/ENCRYPTION.txt -e '
146 s:/usr/local/samba/private:%{EtcSamba}:g +
147 s:mksmbpasswd.sh:mksmbpasswd:g +
148 s:the Samba source directory:/usr/bin:;
150 # End of DirtyHack(TM)
157 CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
158 --prefix='$(DESTDIR)/usr' \
159 --localstatedir='$(DESTDIR)/var' \
160 --libdir='$(DESTDIR)%{EtcSamba}' \
161 --with-privatedir='$(LIBDIR)' \
162 --with-lockdir='$(DESTDIR)/var/lock/samba.d' \
163 --with-swatdir='$(DESTDIR)/usr/share/swat' \
164 --with-smbmount --with-pam --without-smbwrapper \
165 --with-utmp --with-quotas --with-vfs --with-msdfs \
166 --with-profile --with-syslog --with-utmp --with-netatalk \
167 --with-sambabook=$(DESTDIR)/usr/share/swat/using_samba
169 make all nsswitch/libnss_wins.so
174 VVS=packaging/%{Vendor}/%{Dist}
176 mkdir -p $DESTDIR/etc/{{rc.d/init,logrotate,pam}.d,sysconfig/daemons}
177 mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba}
178 mkdir -p $DESTDIR/usr/{share,swat/using_samba}
179 mkdir -p $DESTDIR/home/samba $DESTDIR%{EtcSamba}/codepages/src $DESTDIR/sbin
181 make -C source install
183 strip $DESTDIR/usr/bin/smb{mount,mnt,umount}
184 mv $DESTDIR/usr/bin/{make,add,conv}* $DESTDIR/usr/sbin
186 #cp -p source/codepages/codepage_def.??? $DESTDIR%{EtcSamba}/codepages/src
188 # Install the nsswitch library extension file
189 cp -p source/nsswitch/libnss_wins.so $DESTDIR/lib
190 # Make link for wins resolver
192 ln -s libnss_wins.so libnss_wins.so.2
195 cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba
196 ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin
198 cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample
199 #cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf
200 cp -p $VVS/smbusers $DESTDIR%{EtcSamba}
201 cp -p $VVS/smbprint $DESTDIR/usr/bin
202 cp -p $VVS/smbadduser.perl $DESTDIR/usr/sbin/smbadduser
203 cp -p $VVS/make_smbpasswd.perl $DESTDIR/usr/sbin/make_smbpasswd
204 cp -p $VVS/convertsmbpasswd.perl $DESTDIR/usr/sbin/convertsmbpasswd
205 cp -p $VVS/updatesmbpasswd.perl $DESTDIR/usr/sbin/updatesmbpasswd
206 cp -p $VVS/findsmb $DESTDIR/usr/sbin
207 cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
208 cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
209 cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba
211 for f in testparm testprns; do
212 ln -s $f $DESTDIR/usr/bin/smb$f
213 ln -s $f.1 $DESTDIR/usr/man/man1/smb$f.1
215 ln -s make_smbcodepage $DESTDIR/usr/sbin/mksmbcodepage
216 ln -s make_smbpasswd $DESTDIR/usr/sbin/mksmbpasswd
217 ln -sf convert_smbpasswd $DESTDIR/usr/sbin/convertsmbpasswd
219 cat <<-'EoH' > $DESTDIR%{EtcSamba}/lmhosts
224 DOCD="$DESTDIR/%{_defaultdocdir}/samba-%{Version}"; mkdir -p $DOCD
225 ln -sf ../Copyrights/GPL-2.0 $DOCD/COPYING
226 cp -p README Manifest Read-Manifest-Now WHATSNEW.txt Roadmap $DOCD
227 cp -a docs examples $DOCD
229 mv $DOCD/docs/htmldocs/wfw_slip.htm $DOCD/docs/wfw_slip.html
231 rm -rf $DOCD/docs/{htmldocs,manpages,yodldocs}
232 rm -rf $DOCD/examples/{svr4-startup,printing}
234 cp -p swat/README $DOCD/README.swat
236 %{fixUP} -vT $DOCD/examples -e 's:/usr/local/bin/:/usr/bin/:g;'
241 cat << 'EOF' | %{mkLists} -d samba
242 ^/(etc|var|home) config-IGNORED
244 /usr/doc/samba-[^/]+/$ base
248 cat << 'EOF' | %{mkLists} -f -a samba
250 /doc/samba-[^/]+/(COPYING|README$) base
252 smb(mount|mnt|umount) smbfs
264 lisa --SysV-init install samba S91 3:4:5 K09 0:1:2:6
268 lisa --inetd install swat stream tcp nowait.400 root /usr/sbin/tcpd swat
269 perl -pi -e '$s=1 if /^swat/;
270 print "swat:ALL EXCEPT 127.0.0.1\n" if eof && ! $s' /etc/hosts.deny
274 lisa --SysV-init remove samba $1
275 # We want to remove the browse.dat and wins.dat files so they can not
276 # interfer with a new version of samba!
277 rm -f /var/lock/samba/{browse,wins}.dat
281 lisa --inetd disable swat $1
282 [ -x /usr/sbin/swat ]||perl -ni -e '/^swat\s*\:/||print' /etc/hosts.deny
285 %Files -f files-samba-base
286 %defattr(-,root,root)
287 %config %attr(755,root,root) /etc/rc.d/init.d/samba
288 %config %attr(644,root,root) /etc/sysconfig/daemons/samba
289 %config %attr(644,root,root) /etc/pam.d/samba
290 %config %attr(644,root,root) /etc/logrotate.d/samba
291 %config %attr(-,root,root) %{EtcSamba}
292 %config %attr(755,root,root) /home/samba
294 %dir %attr(755,root,root) /var/lock/samba.d
295 %dir %attr(755,root,root) /var/log/samba.d
296 %dir %attr(1777,root,root) /var/spool/samba
297 #%dir %attr(775,root,nobody) /home/samba
300 %Files doc -f files-samba-doc
301 %defattr(-,root,root)
304 %Files -n smbfs -f files-samba-smbfs
305 %defattr(-,root,root)
308 %Files -n swat -f files-samba-swat
309 %defattr(-,root,root)
313 * Mon Jan 01 1997 ...