wok view squid/receipt @ rev 2385

Up: Squid to 3.0STABLE13
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Mon Mar 09 22:39:02 2009 +0100 (2009-03-09)
parents bd6010223726
children 782c0191b0ae
line source
1 # SliTaz package receipt.
3 PACKAGE="squid"
4 VERSION="3.0.STABLE13"
5 CATEGORY="network"
6 SHORT_DESC="Web/ftp proxy."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
9 WEB_SITE="http://www.squid-cache.org/"
10 WGET_URL="${WEB_SITE}Versions/v3/3.0/$TARBALL"
11 CONFIG_FILES="/etc/squid"
12 #DEPENDS="iptables"
13 BUILD_DEPENDS="perl"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 ./configure --prefix=/usr --infodir=/usr/share/info \
20 --sysconfdir=/etc/squid --localstatedir=/var \
21 --mandir=/usr/share/man $CONFIGURE_ARGS &&
22 make &&
23 make DESTDIR=$PWD/_pkg install
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 mkdir -p $fs/usr/share/errors $fs/var/cache/squid $fs/var/log/squid
30 cp -a $_pkg/etc $fs
31 rm -rf $fs/etc/squid/*.default
32 cp -a stuff/etc $fs
33 cp -a $_pkg/var $fs
34 cp -a $_pkg/usr/bin $fs/usr
35 cp -a $_pkg/usr/sbin $fs/usr
36 cp -a $_pkg/usr/libexec $fs/usr
37 cp -a $_pkg/usr/share/mib.txt $fs/usr/share
38 cp -a $_pkg/usr/share/icons $fs/usr/share
39 cp -a $_pkg/usr/share/errors/English $fs/usr/share/errors
40 cp -a $_pkg/usr/share/errors/French $fs/usr/share/errors
41 rm -f $fs/etc/*conf*
42 sed -i -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
43 -e 's|^access_log /var/logs|access_log /var/log/squid|' \
44 -e 's|^# cache_store_log /var/logs|cache_store_log /var/cache/squid|' \
45 -e 's|^# cache_log /var/logs|cache_log /var/cache/squid|' \
46 -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \
47 -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \
48 -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \
49 $fs/etc/squid/squid.conf
50 # Package all squid pkgs
51 for i in $(cd $WOK; ls -d squid-*)
52 do
53 tazwok genpkg $i
54 done
55 }
57 # Pre and post install commands for Tazpkg.
58 post_install()
59 {
60 chown nobody.nogroup /var/cache/squid /var/log/squid
61 cat <<EOF
62 ----
63 To start $PACKAGE server you can run :
65 /etc/init.d/$PACKAGE start
67 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
68 ----
69 EOF
70 }