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

Busybox config change: unset CONFIG_AR (it conflict with binutils ar) & unset CONFIG_XZ (only unxz is actually usefull - it appears that lzma legacy is our better compression tool)
author Antoine Bodin <gokhlayeh@slitaz.org>
date Fri Dec 10 19:35:10 2010 +0100 (2010-12-10)
parents bd6010223726
children 969eb19b0ab8
line source
1 # SliTaz package receipt.
3 PACKAGE="squirrelmail"
4 VERSION="1.4.21"
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=' $WOK/$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 #echo "Update /short_open_tag in /etc/php.ini"
51 #sed -i 's/^short_open_tag.*/short_open_tag = On/' /etc/php.ini
52 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
53 if ! grep -q /usr/share/squirrelmail/ $1/etc/lighttpd/lighttpd.conf; then
54 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squirrelmail/" => "/usr/share/squirrelmail/",|g' -i $1/etc/lighttpd/lighttpd.conf
55 if [ -z "$1" ]; then
56 # Start Web server.
57 /etc/init.d/lighttpd stop
58 /etc/init.d/lighttpd start
59 fi
60 fi
61 fi
62 # Configure apache server
63 if [ -f $1/etc/apache/httpd.conf ]; then
64 if [ ! -f $1/etc/apache/conf.d/squirrelmail ]; then
65 cat > $1/etc/apache/conf.d/squirrelmail <<EOT
66 <IfModule mod_alias.c>
67 Alias /squirrelmail /usr/share/squirrelmail
68 </IfModule>
69 <DirectoryMatch /usr/share/squirrelmail/>
70 DirectoryIndex index.php
71 Options +FollowSymLinks
72 AllowOverride None
73 Order allow,deny
74 Allow from all
75 </DirectoryMatch>
76 EOT
77 if [ -z "$1" ]; then
78 # Start Web server.
79 /etc/init.d/apache restart
80 fi
81 fi
82 fi
83 }