wok view squirrelmail/receipt @ rev 23432
updated phpvirtualbox (4.0-7 -> 5.2.1)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Apr 01 17:31:39 2020 +0100 (2020-04-01) |
parents | d51b2411e55e |
children | 46dcc80bef41 |
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 LICENSE="GPL2"
9 TARBALL="$PACKAGE-webmail-$VERSION.tar.bz2"
10 WEB_SITE="http://www.squirrelmail.org/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 CONFIG_FILES="/etc/squirrelmail/config.php /etc/squirrelmail/config_local.php"
13 HOST_ARCH="any"
15 DEPENDS="php"
17 # Rules to gen a SliTaz package suitable for Tazpkg.
18 genpkg_rules()
19 {
20 mkdir -p $fs/usr/share/squirrelmail $fs/var/lib/squirrelmail/data \
21 $fs/var/lib/squirrelmail/attach $fs/etc
22 cp -a $src/. $fs/usr/share/squirrelmail
23 sed -i "s/'custom_css', 'none'/'custom_css', 'serif-12.css'/" \
24 $fs/usr/share/squirrelmail/include/load_prefs.php
25 mv $fs/usr/share/squirrelmail/config $fs/etc/squirrelmail
26 ln -s /etc/squirrelmail $fs/usr/share/squirrelmail/config
27 mv $fs/etc/squirrelmail/config_default.* $fs/etc/squirrelmail/config.php
28 for i in demo test fortune; do
29 rm -rf $fs/usr/share/squirrelmail/plugins/$i
30 done
31 for i in $( cd $fs/usr/share/squirrelmail/plugins/ ; ls -d */ ); do
32 echo "\$plugins[] = '${i%/}';"
33 done >> $fs/etc/squirrelmail/config_local.php
34 sed -i -e "s|\$domain = 'example.com'|\$domain = 'localhost'|" \
35 -e 's|/var/local|/var/lib|g' $fs/etc/squirrelmail/config.php
36 chown -R www.www $fs/usr/share/squirrelmail $fs/etc/squirrelmail \
37 $fs/var/lib/squirrelmail
38 chmod 700 $fs/etc/squirrelmail
40 # Package all squirrelmail pkgs
41 if [ -x /usr/bin/cook ]; then
42 cook squirrelmail-locales
43 for i in $(cd $WOK; ls -d squirrelmail-*)
44 do
45 cook $i
46 done
47 fi
48 }
50 post_install()
51 {
52 #echo "Update /short_open_tag in /etc/php.ini"
53 #sed -i 's/^short_open_tag.*/short_open_tag = On/' /etc/php.ini
54 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
55 if ! grep -q /usr/share/squirrelmail/ "$1/etc/lighttpd/lighttpd.conf"; then
56 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squirrelmail/" => "/usr/share/squirrelmail/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
57 if [ -z "$1" ]; then
58 # Start Web server.
59 /etc/init.d/lighttpd stop
60 /etc/init.d/lighttpd start
61 fi
62 fi
63 fi
64 # Configure apache server
65 if [ -f "$1/etc/apache/httpd.conf" ]; then
66 if [ ! -f "$1/etc/apache/conf.d/squirrelmail" ]; then
67 cat > "$1/etc/apache/conf.d/squirrelmail" <<EOT
68 <IfModule mod_alias.c>
69 Alias /squirrelmail /usr/share/squirrelmail
70 </IfModule>
71 <DirectoryMatch /usr/share/squirrelmail/>
72 DirectoryIndex index.php
73 Options +FollowSymLinks
74 AllowOverride None
75 Order allow,deny
76 Allow from all
77 </DirectoryMatch>
78 EOT
79 if [ -z "$1" ]; then
80 # Start Web server.
81 /etc/init.d/apache restart
82 fi
83 fi
84 fi
85 }