wok-next view squid/receipt @ rev 1298
Add: klavaro (typing tutor program)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Aug 21 15:46:00 2008 +0200 (2008-08-21) |
parents | |
children | 3d99ecce2d4b |
line source
1 # SliTaz package receipt.
3 PACKAGE="squid"
4 VERSION="3.0.STABLE8"
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"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 ./configure --prefix=/usr --infodir=/usr/share/info \
19 --sysconfdir=/etc/squid --localstatedir=/var \
20 --mandir=/usr/share/man $CONFIGURE_ARGS
21 make
22 make DESTDIR=$PWD/_pkg install
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 mkdir -p $fs/usr/share/errors $fs/var/cache/squid $fs/var/log/squid
29 cp -a $_pkg/etc $fs
30 rm -rf $fs/etc/squid/*.default
31 cp -a stuff/etc $fs
32 cp -a $_pkg/var $fs
33 cp -a $_pkg/usr/bin $fs/usr
34 cp -a $_pkg/usr/sbin $fs/usr
35 cp -a $_pkg/usr/libexec $fs/usr
36 cp -a $_pkg/usr/share/mib.txt $fs/usr/share
37 cp -a $_pkg/usr/share/icons $fs/usr/share
38 cp -a $_pkg/usr/share/errors/English $fs/usr/share/errors
39 cp -a $_pkg/usr/share/errors/French $fs/usr/share/errors
40 rm -f $fs/etc/*conf*
41 sed -i -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
42 -e 's|^access_log /var/logs|access_log /var/log/squid|' \
43 -e 's|^# cache_store_log /var/logs|cache_store_log /var/cache/squid|' \
44 -e 's|^# cache_log /var/logs|cache_log /var/cache/squid|' \
45 -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \
46 -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \
47 -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \
48 $fs/etc/squid/squid.conf
49 # Package all squid pkgs
50 for i in $(cd $WOK; ls -d squid-*)
51 do
52 tazwok genpkg $i
53 done
54 }
56 # Pre and post install commands for Tazpkg.
57 post_install()
58 {
59 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
60 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
61 $(cd $1/ ; find etc/squid -type f)
62 EOT
63 chown nobody.nogroup /var/cache/squid /var/log/squid
64 cat <<EOF
65 ----
66 To start $PACKAGE server you can run :
68 /etc/init.d/$PACKAGE start
70 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
71 ----
72 EOF
73 }
75 repack_cleanup()
76 {
77 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
78 }