wok-6.x view squirrelmail/receipt @ rev 1310

openldap: add openssl dependancy
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 26 20:19:16 2008 +0000 (2008-08-26)
parents 534023d6e005
children a98dc85bb99a
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"
11 DEPENDS="php"
12 CONFIG_FILES="/etc/squirrelmail/config.php /etc/squirrelmail/config_local.php"
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 sed -i "s/'custom_css', 'none'/'custom_css', 'serif-12.css'/" \
21 $fs/usr/share/squirrelmail/include/load_prefs.php
22 mv $fs/usr/share/squirrelmail/config $fs/etc/squirrelmail
23 ln -s /etc/squirrelmail $fs/usr/share/squirrelmail/config
24 mv $fs/etc/squirrelmail/config_default.* $fs/etc/squirrelmail/config.php
25 for i in demo test fortune; do
26 rm -rf $fs/usr/share/squirrelmail/plugins/$i
27 done
28 for i in $( cd $fs/usr/share/squirrelmail/plugins/ ; ls -d */ ); do
29 echo "\$plugins[] = '${i%/}';"
30 done >> $fs/etc/squirrelmail/config_local.php
31 sed -i -e "s|\$domain = 'example.com'|\$domain = 'localhost'|" \
32 -e 's|/var/local|/var/lib|g' $fs/etc/squirrelmail/config.php
33 chown -R www.www $fs/usr/share/squirrelmail $fs/etc/squirrelmail \
34 $fs/var/lib/squirrelmail
35 chmod 700 $fs/etc/squirrelmail
36 # Package all squirrelmail pkgs
37 for i in $(cd $WOK; ls -d squirrelmail-*)
38 do
39 grep -q '^WANTED=' $i/receipt || tazwok cook $i
40 done
41 for i in $(cd $WOK; grep -l '^WANTED="squirrelmail"$' \
42 squirrelmail-*/receipt)
43 do
44 tazwok genpkg ${i%/receipt}
45 done
46 }
48 post_install()
49 {
50 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
51 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
52 etc/squirrelmail/config.php
53 etc/squirrelmail/config_local.php
54 EOT
55 #echo "Update /short_open_tag in /etc/php.ini"
56 #sed -i 's/^short_open_tag.*/short_open_tag = On/' /etc/php.ini
57 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
58 if ! grep -q /usr/share/squirrelmail/ $1/etc/lighttpd/lighttpd.conf; then
59 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squirrelmail/" => "/usr/share/squirrelmail/",|g' -i $1/etc/lighttpd/lighttpd.conf
60 if [ -z "$1" ]; then
61 # Start Web server.
62 /etc/init.d/lighttpd stop
63 /etc/init.d/lighttpd start
64 fi
65 fi
66 fi
67 }
69 repack_cleanup()
70 {
71 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
72 }