#!/bin/bash #DEP:openldap #DEP:openssl #DEP:mit_kerberos CWD=`pwd` BUILDROOT=`pwd` SRCDIR=`ls | grep squid | grep .tar.gz | cut -f 1,2,3 -d .` PKGTMP="$BUILDROOT/pkgtmp" #NOTE:bij nieuwe versie. SRCDIR eruit!!! en simpeler worden zeg maar :-) <- psy zijn txt VERSION=2.7 tar zxvf $SRCDIR.tar.gz cd $SRCDIR echo `pwd` ./configure --prefix=/usr \ --sysconfdir=/home/system/proxy \ --localstatedir=/var \ --libexecdir=/usr/bin \ --with-large-files \ --enable-large-cache-files \ --enable-negotiate-auth-helpers=squid_kerb_auth \ --enable-stacktraces \ --enable-external-acl-helpers="ip_user,ldap_group,unix_group,wbinfo_group" \ --enable-auth="basic,ntlm,negotiate" \ --enable-follow-x-forwarded-for \ --enable-basic-auth-helpers="LDAP,NCSA,SMB" || exit 1 CFLAGS="-DHAVE_SPNEGO -D__LITTLE_ENDIAN__" export CFLAGS make all || exit 1 make DESTDIR=$PKGTMP install || exit 1 rm -r $PKGTMP/var/logs mkdir -p $PKGTMP/etc/logrotate.d mkdir -p $PKGTMP/etc/pam.d mkdir -p $PKGTMP/etc/postinst.d mkdir -p $PKGTMP/etc/rc.d mkdir -p $PKGTMP/var/log/squid mkdir -p $PKGTMP/home/system/proxy/cache mkdir -p $PKGTMP/install cp $BUILDROOT/logrotate.squid $PKGTMP/etc/logrotate.d/squid || exit 1 cp $BUILDROOT/squid.pam $PKGTMP/etc/pam.d/squid || exit 1 chmod 644 $PKGTMP/etc/logrotate.d/squid chmod 644 $PKGTMP/etc/pam.d/squid cp $BUILDROOT/squid.conf $PKGTMP/home/system/proxy/squid.conf || exit 1 #ivm nieuw systeem niet meer nodig. staat nu ook in filterlists #cp $BUILDROOT/squid-urls.conf $PKGTMP/home/system/proxy/squid-urls.conf || exit 1 chown nobody:nogroup $PKGTMP/home/system/proxy/cache chown nobody:nogroup $PKGTMP/var/log/squid mkdir -p $PKGTMP/service/squid cat << EOF > $PKGTMP/service/squid/run #!/bin/bash chown -R nobody /home/system/proxy/cache exec /usr/sbin/squid -D -N EOF chmod +x $PKGTMP/service/squid/run #installleer ACL files. mkdir -p $PKGTMP/home/system/proxy/filterlists cp $BUILDROOT/filterlists/* $PKGTMP/home/system/proxy/filterlists #maak alle configfiles eindigend op .new find $PKGTMP/etc $PKGTMP/home -follow -type f -exec mv "{}" "{}.new" \; || exit 1 #bepaalde files moeten juist niet op .new eindigen! mv $PKGTMP/etc/logrotate.d/squid.new $PKGTMP/etc/logrotate.d/squid || exit 1 mv $PKGTMP/etc/pam.d/squid.new $PKGTMP/etc/pam.d/squid || exit 1 #bop tenslotte de postinstall der nog ff in. cp $BUILDROOT/post.squid $PKGTMP/etc/postinst.d/post.squid || exit 1 #verwijderen van default configuratie files - wij hebben de syn-3 config file rm $PKGTMP/home/system/proxy/squid.conf.default* rm $PKGTMP/home/system/proxy/mime.conf.default.new cd $PKGTMP NAME=`echo $0|cut -f2 -d'.'` makepkg -l y -c n $CWD/$NAME.pkg && echo $VERSION > $CWD/$NAME.version && uname -m > $CWD/$NAME.arch cd $BUILDROOT rm -rf $PKGTMP $SRCDIR