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

pcmciautils: Fixed WGET_URL.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Oct 17 00:27:48 2011 +0000 (2011-10-17)
parents cf404562b727
children f04a7db11ba8
line source
1 # SliTaz package receipt.
3 PACKAGE="squirrelmail"
4 VERSION="1.4.22"
5 CATEGORY="network"
6 SHORT_DESC="Web mail."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-webmail-$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 cook squirrelmail-locales
38 for i in $(cd $WOK; ls -d squirrelmail-*)
39 do
40 cook $i
41 done
42 }
44 post_install()
45 {
46 #echo "Update /short_open_tag in /etc/php.ini"
47 #sed -i 's/^short_open_tag.*/short_open_tag = On/' /etc/php.ini
48 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
49 if ! grep -q /usr/share/squirrelmail/ $1/etc/lighttpd/lighttpd.conf; then
50 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squirrelmail/" => "/usr/share/squirrelmail/",|g' -i $1/etc/lighttpd/lighttpd.conf
51 if [ -z "$1" ]; then
52 # Start Web server.
53 /etc/init.d/lighttpd stop
54 /etc/init.d/lighttpd start
55 fi
56 fi
57 fi
58 # Configure apache server
59 if [ -f $1/etc/apache/httpd.conf ]; then
60 if [ ! -f $1/etc/apache/conf.d/squirrelmail ]; then
61 cat > $1/etc/apache/conf.d/squirrelmail <<EOT
62 <IfModule mod_alias.c>
63 Alias /squirrelmail /usr/share/squirrelmail
64 </IfModule>
65 <DirectoryMatch /usr/share/squirrelmail/>
66 DirectoryIndex index.php
67 Options +FollowSymLinks
68 AllowOverride None
69 Order allow,deny
70 Allow from all
71 </DirectoryMatch>
72 EOT
73 if [ -z "$1" ]; then
74 # Start Web server.
75 /etc/init.d/apache restart
76 fi
77 fi
78 fi
79 }