source: npl/internetserver/squid/squid.SlackBuild3 @ 0bdb49c

perl-5.22
Last change on this file since 0bdb49c 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.6 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=3.5
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--enable-stacktraces \
22--enable-auth \
23--enable-follow-x-forwarded-for || exit 1
24#--enable-negotiate-auth-helpers=squid_kerb_auth \
25#--enable-external-acl-helpers="ip_user,ldap_group,unix_group,wbinfo_group" \
26#--enable-basic-auth-helpers="LDAP,NCSA,SMB" || exit 1
27
28#CFLAGS="-DHAVE_SPNEGO -D__LITTLE_ENDIAN__"
29#export CFLAGS
30make all || exit 1
31make DESTDIR=$PKGTMP install || exit 1
32
33rm -r $PKGTMP/var/logs
34
35mkdir -p $PKGTMP/etc/logrotate.d
36mkdir -p $PKGTMP/etc/pam.d
37mkdir -p $PKGTMP/etc/postinst.d
38mkdir -p $PKGTMP/etc/rc.d
39mkdir -p $PKGTMP/var/log/squid
40mkdir -p $PKGTMP/home/system/proxy/cache
41mkdir -p $PKGTMP/install
42cp $BUILDROOT/logrotate.squid $PKGTMP/etc/logrotate.d/squid || exit 1
43cp $BUILDROOT/squid.pam $PKGTMP/etc/pam.d/squid || exit 1
44chmod 644 $PKGTMP/etc/logrotate.d/squid
45chmod 644 $PKGTMP/etc/pam.d/squid
46cp $BUILDROOT/squid.conf $PKGTMP/home/system/proxy/squid.conf || exit 1
47#ivm nieuw systeem niet meer nodig. staat nu ook in filterlists
48#cp $BUILDROOT/squid-urls.conf $PKGTMP/home/system/proxy/squid-urls.conf || exit 1
49chown nobody:nogroup $PKGTMP/home/system/proxy/cache
50chown nobody:nogroup $PKGTMP/var/log/squid
51mkdir -p $PKGTMP/service/squid
52cat << EOF > $PKGTMP/service/squid/run
53#!/bin/bash
54chown -R nobody /home/system/proxy/cache
55exec /usr/sbin/squid -D -N
56EOF
57chmod +x $PKGTMP/service/squid/run
58
59
60#installleer ACL files.
61mkdir -p $PKGTMP/home/system/proxy/filterlists
62cp $BUILDROOT/filterlists/* $PKGTMP/home/system/proxy/filterlists
63
64#maak alle configfiles eindigend op .new
65find $PKGTMP/etc $PKGTMP/home -follow -type f -exec mv "{}" "{}.new" \; || exit 1
66
67#bepaalde files moeten juist niet op .new eindigen!
68mv $PKGTMP/etc/logrotate.d/squid.new $PKGTMP/etc/logrotate.d/squid || exit 1
69mv $PKGTMP/etc/pam.d/squid.new $PKGTMP/etc/pam.d/squid || exit 1
70
71#bop tenslotte de postinstall der nog ff in.
72cp $BUILDROOT/post.squid $PKGTMP/etc/postinst.d/post.squid || exit 1
73
74#verwijderen van default configuratie files - wij hebben de syn-3 config file
75rm $PKGTMP/home/system/proxy/squid.conf.default*
76rm $PKGTMP/home/system/proxy/mime.conf.default.new
77cd $PKGTMP
78
79NAME=`echo $0|cut -f2 -d'.'`
80makepkg -l y -c n $CWD/$NAME.pkg &&
81
82echo $VERSION > $CWD/$NAME.version &&
83uname -m > $CWD/$NAME.arch
84
85cd $BUILDROOT
86rm -rf $PKGTMP $SRCDIR
Note: See TracBrowser for help on using the repository browser.