wok-4.x view squirrelmail/receipt @ rev 1198

Add squirrelmail
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Aug 08 08:58:38 2008 +0000 (2008-08-08)
parents
children e1c40827b929
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 #/var/local/squirrelmail/data/
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 mkdir -p $fs/usr/share/squirrelmail $fs/var/lib/squirrelmail/data \
18 $fs/var/lib/squirrelmail/attach $fs/etc
19 cp -a $src/. $fs/usr/share/squirrelmail
20 mv $fs/usr/share/squirrelmail/config $fs/etc/squirrelmail
21 ln -s /etc/squirrelmail $fs/usr/share/squirrelmail/config
22 mv $fs/etc/squirrelmail/config_default.* $fs/etc/squirrelmail/config.php
23 sed -i -e "s|\$domain = 'example.com'|\$domain = 'localhost'|" \
24 -e 's|/var/local|/var/lib|g' $fs/etc/squirrelmail/config.php
25 chown -R www.www $fs/usr/share/squirrelmail $fs/etc/squirrelmail \
26 $fs/var/lib/squirrelmail
27 chmod 700 $fs/etc/squirrelmail
28 Package all squirrelmail pkgs
29 for i in $(cd $WOK; ls -d squirrelmail-*)
30 do
31 grep -q '^WANTED=' $i/receipt || tazwok cook $i
32 done
33 for i in $(cd $WOK; grep -l '^WANTED="squirrelmail"$' \
34 squirrelmail-*/receipt)
35 do
36 tazwok genpkg ${i%/receipt}
37 done
38 }
40 post_install()
41 {
42 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
43 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
44 etc/squirrelmail/config.php
45 etc/squirrelmail/config_local.php
46 EOT
47 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
48 if ! grep -q /usr/share/squirrelmail/ $1/etc/lighttpd/lighttpd.conf; then
49 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squirrelmail/" => "/usr/share/squirrelmail/",|g' -i $1/etc/lighttpd/lighttpd.conf
50 if [ -z "$1" ]; then
51 # Start Web server.
52 /etc/init.d/lighttpd stop
53 /etc/init.d/lighttpd start
54 fi
55 fi
56 fi
57 }
59 repack_cleanup()
60 {
61 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
62 }