wok-4.x view squid/receipt @ rev 1869

Cleanup tck/tk packages.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Tue Dec 16 22:46:36 2008 +0100 (2008-12-16)
parents 4784eb863cc5
children bd6010223726
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"
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 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
61 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
62 $(cd $1/ ; find etc/squid -type f)
63 EOT
64 chown nobody.nogroup /var/cache/squid /var/log/squid
65 cat <<EOF
66 ----
67 To start $PACKAGE server you can run :
69 /etc/init.d/$PACKAGE start
71 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
72 ----
73 EOF
74 }
76 repack_cleanup()
77 {
78 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
79 }