From 48b47496cc0c0692e5549c0b5126165a23d7611b Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Fri, 4 Aug 2000 20:53:28 +0000 Subject: Adding build system files for Caldera OpenLinux. (This used to be commit 8de3786f5ad473aab90bb3fbf7e6ca2714f91751) --- .../OpenLinux/samba-3.0.0.pre-install.patch | 12 + packaging/Caldera/OpenLinux/samba3.spec.tmpl | 299 +++++++++++++++++++++ 2 files changed, 311 insertions(+) create mode 100644 packaging/Caldera/OpenLinux/samba-3.0.0.pre-install.patch create mode 100644 packaging/Caldera/OpenLinux/samba3.spec.tmpl (limited to 'packaging/Caldera') diff --git a/packaging/Caldera/OpenLinux/samba-3.0.0.pre-install.patch b/packaging/Caldera/OpenLinux/samba-3.0.0.pre-install.patch new file mode 100644 index 0000000000..f6571a2763 --- /dev/null +++ b/packaging/Caldera/OpenLinux/samba-3.0.0.pre-install.patch @@ -0,0 +1,12 @@ +--- samba/source/script/installbin.sh.orig Mon Dec 13 14:27:43 1999 ++++ samba/source/script/installbin.sh Fri Jun 16 15:06:13 2000 +@@ -34,7 +34,8 @@ + + # this is a special case, mount needs this in a specific location + if [ $p2 = smbmount ]; then +- ln -sf $BINDIR/$p2 /sbin/mount.smbfs ++ cp -p $BINDIR/$p2 /sbin/mount.smbfs ++ ln -s /sbin/mount.smbfs $BINDIR/$p2 + fi + done + diff --git a/packaging/Caldera/OpenLinux/samba3.spec.tmpl b/packaging/Caldera/OpenLinux/samba3.spec.tmpl new file mode 100644 index 0000000000..e3cd9524d4 --- /dev/null +++ b/packaging/Caldera/OpenLinux/samba3.spec.tmpl @@ -0,0 +1,299 @@ +%define Version PVERSION +%define date PRELEASE +%define Vendor Caldera +%define Dist OpenLinux +%define EtcSamba /etc/samba.d + +Name : samba +Version : %{Version} +Release : %{date} +Group : Server/Network + +Summary : Samba SMB client and server. + +Copyright : Andrew Tridgell, John H Terpstra; GPL +Packager : Klaus Singvogel +Icon : Caldera-daemon.gif +URL : http://samba.org/samba + +Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6 + + +BuildRoot : /tmp/%{Name}-%{Version} + +Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}%{date}.tar.gz +#Patch0: %{Name}-%{Version}-smbmount.patch +Patch1: %{Name}-%{Version}-install.patch +#Patch2: %{Name}-%{Version}-smbconf.patch + + +%Package doc +Group : Server/Network + +Summary : Documentation on SAMBA. + + +%Package -n smbfs +Group : System/Network + +Summary : Mount and unmount commands for SMB filesystems (smbfs). + + +%Package -n swat +Group : Administration/Network +Requires : setup >= 2.0-2, tcp_wrappers + +Summary : Samba Web Administration Tool. + + +%Description +Samba provides an SMB server which can be used to provide +network services to SMB (sometimes called "Lan Manager") +clients, including various versions of MS Windows, OS/2, +and other Linux machines. Samba also provides some SMB +clients, which complement the built-in SMB filesystem +in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols +and does NOT need NetBEUI (Microsoft Raw NetBIOS frame) +protocol. + +Samba-2 features an almost working NT Domain Control +capability and includes the new SWAT (Samba Web Administration +Tool) that allows samba's smb.conf file to be remotely managed +using your favourite web browser. For the time being this is +being enabled on TCP port 901 via inetd. + +Please refer to the WHATSNEW.txt document for fixup information. +This binary release includes encrypted password support. +Please read the smb.conf file and ENCRYPTION.txt in the +docs directory for implementation details. + +NOTE: Caldera OpenLinux uses PAM which has integrated support +for Shadow passwords. Do NOT recompile with the SHADOW_PWD option +enabled. Caldera OpenLinux has(?) built-in support for quotas in PAM. + + +%Description doc +Documentation on SAMBA. + + +%Description -n smbfs +Smbmount and smbumount are an interface to the SMB filesystem. Smbfs is +a filesystem which understands the SMB protocol. This is the protocol +Windows for Workgroups, Windows NT or Lan Manager use to talk to each +other. It was inspired by samba, the program by Andrew Tridgell that +turns any unix site into a file server for DOS or Windows clients. See +http://samba.org/samba for this interesting program suite and lots of +more information on SMB and NetBIOS over TCP/IP. There you also find +explanation for conceps like NetBIOS name or share. + + +%Description -n swat +swat allows a Samba administrator to configure the complex smb.conf +file via a Web browser. In addition, a swat configuration page has +help links to all the configurable options in the smb.conf file +allowing an administrator to easily look up the effects of any change. + + +%Prep +%setup -n samba +#%%patch0 -p1 +%patch1 -p1 +#%patch2 -p1 + +# instead of patch (to help configuration) ... ;^) +%{fixUP} -vbT source/Makefile.in -e ' + s:we don.t use sbindir because we want:if you want : + + s:(the previous releases of Samba):$1, please use: + + s:(SBINDIR\s*=\s*\@)b:# ./configure --sbindir=\\\$(BINDIR)\n${1}sb: + + s:/log\.(\S+):/log/samba.d/${1}d: + + s:(PASSWD_PROGRAM\s*=\s*)(/bin):$1/usr$2: + + s:^(LIBS\s*=):AUTH_$1: + + s:((SMBD|SWAT|RPCCLIENT|SMBPASSWD)_OBJ\) )(\$\(LDF):$1\$(AUTH_LIBS) $3: +' + +for i in {cvs.,change-}log; do [ ! -f ../$i ] || mv ../$i source; done + +mv swat/help/welcome.html docs +%{fixUP} -vT docs -e ' + s:/usr/local/samba/bin/(smb(client|run)):/usr/bin/$1:g + + s:/usr/local/samba/bin/((s|n)mbd|swat):/usr/sbin/$1:g + + s:/usr/local/samba/var/locks:/var/lock/samba.d: + + s:/usr/local/samba/(var|lib)/log:/var/log/samba.d/smb: + + s:/usr/local/samba/swat:/usr/share/samba/swat:g + + s:/usr/local/samba/lib:%{EtcSamba}:g; +' +mv docs/welcome.html swat/help +for i in docs/*/smb.conf.5*; do + %{fixUP} -vT $i -e ' + s:users\.map:smbusers:g + + s:SAMBA_INSTALL_DIRECTORY/lib:%{EtcSamba}: + + s:None \(set in compile\)\.:(see above).: + + s:/usr/local/:/usr/:g; + ' +done +%{fixUP} -vT docs/textdocs/Faxing.txt -e ' + s:/usr/local/etc/:/etc/: + + s:/usr/local/:/usr/:; +' +%{fixUP} -vT docs/textdocs/ENCRYPTION.txt -e ' + s:/usr/local/samba/private:%{EtcSamba}:g + + s:mksmbpasswd.sh:mksmbpasswd:g + + s:the Samba source directory:/usr/bin:; +' +# End of DirtyHack(TM) + + +%Build +cd source +autoreconf + +CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \ + --prefix='$(DESTDIR)/usr' \ + --localstatedir='$(DESTDIR)/var' \ + --libdir='$(DESTDIR)%{EtcSamba}' \ + --with-privatedir='$(LIBDIR)' \ + --with-lockdir='$(DESTDIR)/var/lock/samba.d' \ + --with-swatdir='$(DESTDIR)/usr/share/swat' \ + --with-smbmount --with-pam --without-smbwrapper \ + --with-utmp + +make all + + +%Install +%{mkDESTDIR} +VVS=packaging/%{Vendor}/%{Dist} + +mkdir -p $DESTDIR/etc/{{rc.d/init,logrotate,pam}.d,sysconfig/daemons} +mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba} +mkdir -p $DESTDIR/usr/{share,swat} +mkdir -p $DESTDIR/home/samba $DESTDIR%{EtcSamba}/codepages/src $DESTDIR/sbin + +make -C source install + +strip $DESTDIR/usr/bin/smb{mount,mnt,umount} +mv $DESTDIR/usr/bin/{make,add,conv}* $DESTDIR/usr/sbin + +#cp -p source/codepages/codepage_def.??? $DESTDIR%{EtcSamba}/codepages/src + +cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba +ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin + +cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample +#cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf +cp -p $VVS/smbusers $DESTDIR%{EtcSamba} +cp -p $VVS/smbprint $DESTDIR/usr/bin +cp -p $VVS/smbadduser.perl $DESTDIR/usr/sbin/smbadduser +cp -p $VVS/make_smbpasswd.perl $DESTDIR/usr/sbin/make_smbpasswd +cp -p $VVS/convertsmbpasswd.perl $DESTDIR/usr/sbin/convertsmbpasswd +cp -p $VVS/updatesmbpasswd.perl $DESTDIR/usr/sbin/updatesmbpasswd +cp -p $VVS/findsmb $DESTDIR/usr/sbin +cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba +cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba +cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba + +for f in testparm testprns; do + ln -s $f $DESTDIR/usr/bin/smb$f + ln -s $f.1 $DESTDIR/usr/man/man1/smb$f.1 +done +ln -s make_smbcodepage $DESTDIR/usr/sbin/mksmbcodepage +ln -s make_smbpasswd $DESTDIR/usr/sbin/mksmbpasswd +ln -sf convert_smbpasswd $DESTDIR/usr/sbin/convertsmbpasswd + +cat <<-'EoH' > $DESTDIR%{EtcSamba}/lmhosts + 127.0.0.1 localhost +EoH + + +DOCD="$DESTDIR/%{_defaultdocdir}/samba-%{Version}"; mkdir -p $DOCD +ln -sf ../Copyrights/GPL-2.0 $DOCD/COPYING +cp -p README Manifest Read-Manifest-Now WHATSNEW.txt Roadmap $DOCD +cp -a docs examples $DOCD + +mv $DOCD/docs/htmldocs/wfw_slip.htm $DOCD/docs/wfw_slip.html + +rm -rf $DOCD/docs/{htmldocs,manpages,yodldocs} +rm -rf $DOCD/examples/{svr4-startup,printing} + +cp -p swat/README $DOCD/README.swat + +%{fixUP} -vT $DOCD/examples -e 's:/usr/local/bin/:/usr/bin/:g;' + +%{fixManPages} + +%{mkLists} -c samba +cat << 'EOF' | %{mkLists} -d samba +^/(etc|var|home) config-IGNORED +swat swat +/usr/doc/samba-[^/]+/$ base +/doc/samba- doc +@default@ +EOF +cat << 'EOF' | %{mkLists} -f -a samba +^/etc config-IGNORED +/doc/samba-[^/]+/(COPYING|README$) base +/doc/samba- doc +smb(mount|mnt|umount) smbfs +mount.smbfs smbfs +swat swat +@default@ +EOF + + +%Clean +%{rmDESTDIR} + + +%Post +lisa --SysV-init install samba S91 3:4:5 K09 0:1:2:6 + + +%Post -n swat +lisa --inetd install swat stream tcp nowait.400 root /usr/sbin/tcpd swat +perl -pi -e '$s=1 if /^swat/; + print "swat:ALL EXCEPT 127.0.0.1\n" if eof && ! $s' /etc/hosts.deny + + +%PostUn +lisa --SysV-init remove samba $1 +# We want to remove the browse.dat and wins.dat files so they can not +# interfer with a new version of samba! +rm -f /var/lock/samba/{browse,wins}.dat + + +%PostUn -n swat +lisa --inetd disable swat $1 +[ -x /usr/sbin/swat ]||perl -ni -e '/^swat\s*\:/||print' /etc/hosts.deny + + +%Files -f files-samba-base +%defattr(-,root,root) +%config %attr(755,root,root) /etc/rc.d/init.d/samba +%config %attr(644,root,root) /etc/sysconfig/daemons/samba +%config %attr(644,root,root) /etc/pam.d/samba +%config %attr(644,root,root) /etc/logrotate.d/samba +%config %attr(-,root,root) %{EtcSamba} +%config %attr(755,root,root) /home/samba + +%dir %attr(755,root,root) /var/lock/samba.d +%dir %attr(755,root,root) /var/log/samba.d +%dir %attr(1777,root,root) /var/spool/samba +#%dir %attr(775,root,nobody) /home/samba + + +%Files doc -f files-samba-doc +%defattr(-,root,root) + + +%Files -n smbfs -f files-samba-smbfs +%defattr(-,root,root) + + +%Files -n swat -f files-samba-swat +%defattr(-,root,root) + + +%ChangeLog +* Mon Jan 01 1997 ... +$Id: samba3.spec.tmpl,v 1.1 2000/08/04 20:53:28 jht Exp $ + -- cgit