wok-next view squirrelmail/receipt @ rev 15040
fltk-2.0.x: create makedepend files
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 12 13:39:28 2013 +0000 (2013-08-12) |
parents | 969eb19b0ab8 |
children | b13ed9740841 |
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
37 # Package all squirrelmail pkgs
38 if [ -x /usr/bin/cook ]; then
39 cook squirrelmail-locales
40 for i in $(cd $WOK; ls -d squirrelmail-*)
41 do
42 cook $i
43 done
44 fi
45 }
47 post_install()
48 {
49 #echo "Update /short_open_tag in /etc/php.ini"
50 #sed -i 's/^short_open_tag.*/short_open_tag = On/' /etc/php.ini
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 # Configure apache server
62 if [ -f $1/etc/apache/httpd.conf ]; then
63 if [ ! -f $1/etc/apache/conf.d/squirrelmail ]; then
64 cat > $1/etc/apache/conf.d/squirrelmail <<EOT
65 <IfModule mod_alias.c>
66 Alias /squirrelmail /usr/share/squirrelmail
67 </IfModule>
68 <DirectoryMatch /usr/share/squirrelmail/>
69 DirectoryIndex index.php
70 Options +FollowSymLinks
71 AllowOverride None
72 Order allow,deny
73 Allow from all
74 </DirectoryMatch>
75 EOT
76 if [ -z "$1" ]; then
77 # Start Web server.
78 /etc/init.d/apache restart
79 fi
80 fi
81 fi
82 }