wok-current view squirrelmail/receipt @ rev 1208

mysql: bind to localhost by default
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 09 12:21:10 2008 +0000 (2008-08-09)
parents e1c40827b929
children 534023d6e005
line source
1 # SliTaz package receipt.
3 PACKAGE="squirrelmail"
4 VERSION="1.4.15"
5 CATEGORY="network"
6 SHORT_DESC="Web mail."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
9 WEB_SITE="http://www.squirrelmail.org/"
10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p $fs/usr/share/squirrelmail $fs/var/lib/squirrelmail/data \
16 $fs/var/lib/squirrelmail/attach $fs/etc
17 cp -a $src/. $fs/usr/share/squirrelmail
18 mv $fs/usr/share/squirrelmail/config $fs/etc/squirrelmail
19 ln -s /etc/squirrelmail $fs/usr/share/squirrelmail/config
20 mv $fs/etc/squirrelmail/config_default.* $fs/etc/squirrelmail/config.php
21 for i in demo test fortune; do
22 rm -rf $fs/usr/share/squirrelmail/plugins/$i
23 done
24 for i in $( cd $fs/usr/share/squirrelmail/plugins/ ; ls -d */ ); do
25 echo "\$plugins[] = '${i%/}';"
26 done >> $fs/etc/squirrelmail/config_local.php
27 sed -i -e "s|\$domain = 'example.com'|\$domain = 'localhost'|" \
28 -e 's|/var/local|/var/lib|g' $fs/etc/squirrelmail/config.php
29 chown -R www.www $fs/usr/share/squirrelmail $fs/etc/squirrelmail \
30 $fs/var/lib/squirrelmail
31 chmod 700 $fs/etc/squirrelmail
32 # Package all squirrelmail pkgs
33 for i in $(cd $WOK; ls -d squirrelmail-*)
34 do
35 grep -q '^WANTED=' $i/receipt || tazwok cook $i
36 done
37 for i in $(cd $WOK; grep -l '^WANTED="squirrelmail"$' \
38 squirrelmail-*/receipt)
39 do
40 tazwok genpkg ${i%/receipt}
41 done
42 }
44 post_install()
45 {
46 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
47 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
48 etc/squirrelmail/config.php
49 etc/squirrelmail/config_local.php
50 EOT
51 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
52 if ! grep -q /usr/share/squirrelmail/ $1/etc/lighttpd/lighttpd.conf; then
53 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squirrelmail/" => "/usr/share/squirrelmail/",|g' -i $1/etc/lighttpd/lighttpd.conf
54 if [ -z "$1" ]; then
55 # Start Web server.
56 /etc/init.d/lighttpd stop
57 /etc/init.d/lighttpd start
58 fi
59 fi
60 fi
61 }
63 repack_cleanup()
64 {
65 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
66 }