#!/bin/sh # Build samba for Slackware. CWD=`pwd` VERSION=2.2.4 cd /tmp tar xjvf $CWD/samba-$VERSION.tar.bz2 cd samba-$VERSION if [ -r /usr/lib/libcups.so ]; then echo -n "hit enter to go ahead and build with a nasty cups dependency" read foo fi # We must define LIBS with -lcrypt first, or we will end up using # the crypt() from libcrypto, which doesn't support MD5. zcat $CWD/samba.ssl.diff.gz | patch -p1 --verbose --backup --suffix=.orig cd source # Samba adds -O in addition to what's pre-supplied. # Usually I go for -O2, but I trust their judgement. CFLAGS="-march=i386 -mcpu=i686" ./configure \ --with-fhs \ --prefix=/usr \ --localstatedir=/var \ --bindir=/usr/bin \ --sbindir=/usr/sbin \ --with-lockdir=/var/cache/samba \ --sysconfdir=/etc \ --with-configdir=/etc/samba \ --with-privatedir=/etc/samba/private \ --with-codepagedir=/etc/codepages \ --with-smbmount \ --with-quotas \ --with-syslog \ --with-utmp \ --with-sambabook=/usr/share/swat/using_samba \ --with-ssl \ --with-sslinc=/usr/include/openssl \ --with-ssllib=/usr \ --with-msdfs \ --with-vfs \ i386-slackware-linux make mkdir -p /usr/share/samba/codepages \ /usr/doc/samba-$VERSION/swat \ /var/spool/samba \ /etc/samba/private \ /var/cache/samba chmod 700 /etc/samba/private make install rmdir /usr/private /usr/share/samba/codepages cat $CWD/smb.conf-sample > /etc/samba/smb.conf-sample # We'll put this in the docs directory since we start Samba from inetd now: mkdir -p /usr/doc/samba-$VERSION/examples cat $CWD/rc.samba > /usr/doc/samba-$VERSION/examples/rc.samba chmod 755 /usr/doc/samba-$VERSION/examples/rc.samba cd .. cp -a COPYING Manifest README Read-Manifest-Now Roadmap WHATSNEW.txt docs examples \ /usr/doc/samba-$VERSION cp -a swat/README /usr/doc/samba-$VERSION/swat chown -R root.root /usr/doc/samba-$VERSION ( cd /usr/doc/samba-$VERSION/docs/htmldocs rm -rf using_samba ln -sf /usr/share/samba/swat/using_samba . ) mkdir -p /install cat $CWD/slack-desc > /install/slack-desc cat << EOF *** Be sure the package contains: drwx------ 2 root root 1024 Mar 12 13:21 /etc/samba/private drwxr-xr-x 2 root root 4096 May 3 15:46 /var/cache/samba/ drwxr-xr-x 2 root root 1024 Mar 12 13:21 /var/spool/samba/ EOF