source: npl/internetserver/squid/squid.SlackBuild @ e934840

gcc484perl-5.22
Last change on this file since e934840 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 2.7 KB
Line 
1#!/bin/bash
2#DEP:openldap
3#DEP:openssl
4#DEP:mit_kerberos
5
6CWD=`pwd`
7BUILDROOT=`pwd`
8SRCDIR=`ls | grep squid | grep .tar.gz | cut -f 1,2,3 -d .`
9PKGTMP="$BUILDROOT/pkgtmp"
10#NOTE:bij nieuwe versie. SRCDIR eruit!!! en simpeler worden zeg maar :-) <- psy zijn txt
11VERSION=2.7
12
13tar zxvf $SRCDIR.tar.gz
14cd $SRCDIR
15echo `pwd`
16
17./configure --prefix=/usr \
18--sysconfdir=/home/system/proxy \
19--localstatedir=/var \
20--libexecdir=/usr/bin \
21--with-large-files \
22--enable-large-cache-files \
23--enable-negotiate-auth-helpers=squid_kerb_auth \
24--enable-stacktraces \
25--enable-external-acl-helpers="ip_user,ldap_group,unix_group,wbinfo_group" \
26--enable-auth="basic,ntlm,negotiate" \
27--enable-follow-x-forwarded-for \
28--enable-basic-auth-helpers="LDAP,NCSA,SMB" || exit 1
29
30CFLAGS="-DHAVE_SPNEGO -D__LITTLE_ENDIAN__"
31export CFLAGS
32make all || exit 1
33make DESTDIR=$PKGTMP install || exit 1
34
35rm -r $PKGTMP/var/logs
36
37mkdir -p $PKGTMP/etc/logrotate.d
38mkdir -p $PKGTMP/etc/pam.d
39mkdir -p $PKGTMP/etc/postinst.d
40mkdir -p $PKGTMP/etc/rc.d
41mkdir -p $PKGTMP/var/log/squid
42mkdir -p $PKGTMP/home/system/proxy/cache
43mkdir -p $PKGTMP/install
44cp $BUILDROOT/logrotate.squid $PKGTMP/etc/logrotate.d/squid || exit 1
45cp $BUILDROOT/squid.pam $PKGTMP/etc/pam.d/squid || exit 1
46chmod 644 $PKGTMP/etc/logrotate.d/squid
47chmod 644 $PKGTMP/etc/pam.d/squid
48cp $BUILDROOT/squid.conf $PKGTMP/home/system/proxy/squid.conf || exit 1
49#ivm nieuw systeem niet meer nodig. staat nu ook in filterlists
50#cp $BUILDROOT/squid-urls.conf $PKGTMP/home/system/proxy/squid-urls.conf || exit 1
51chown nobody:nogroup $PKGTMP/home/system/proxy/cache
52chown nobody:nogroup $PKGTMP/var/log/squid
53mkdir -p $PKGTMP/service/squid
54cat << EOF > $PKGTMP/service/squid/run
55#!/bin/bash
56chown -R nobody /home/system/proxy/cache
57exec /usr/sbin/squid -D -N
58EOF
59chmod +x $PKGTMP/service/squid/run
60
61
62#installleer ACL files.
63mkdir -p $PKGTMP/home/system/proxy/filterlists
64cp $BUILDROOT/filterlists/* $PKGTMP/home/system/proxy/filterlists
65
66#maak alle configfiles eindigend op .new
67find $PKGTMP/etc $PKGTMP/home -follow -type f -exec mv "{}" "{}.new" \; || exit 1
68
69#bepaalde files moeten juist niet op .new eindigen!
70mv $PKGTMP/etc/logrotate.d/squid.new $PKGTMP/etc/logrotate.d/squid || exit 1
71mv $PKGTMP/etc/pam.d/squid.new $PKGTMP/etc/pam.d/squid || exit 1
72
73#bop tenslotte de postinstall der nog ff in.
74cp $BUILDROOT/post.squid $PKGTMP/etc/postinst.d/post.squid || exit 1
75
76#verwijderen van default configuratie files - wij hebben de syn-3 config file
77rm $PKGTMP/home/system/proxy/squid.conf.default*
78rm $PKGTMP/home/system/proxy/mime.conf.default.new
79cd $PKGTMP
80
81NAME=`echo $0|cut -f2 -d'.'`
82makepkg -l y -c n $CWD/$NAME.pkg &&
83
84echo $VERSION > $CWD/$NAME.version &&
85uname -m > $CWD/$NAME.arch
86
87cd $BUILDROOT
88rm -rf $PKGTMP $SRCDIR
Note: See TracBrowser for help on using the repository browser.