wok-6.x view squirrelmail/receipt @ rev 25467
Up gnumeric (1.12.53)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Oct 03 08:28:51 2022 +0000 (2022-10-03) |
parents | 46dcc80bef41 |
children |
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="https://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 current_version()
18 {
19 wget -O - $WEB_SITE 2>/dev/null | \
20 sed '/Released/!d;s|.*SquirrelMail ||;s| Released.*||;q'
21 }
23 # Rules to gen a SliTaz package suitable for Tazpkg.
24 genpkg_rules()
25 {
26 mkdir -p $fs/usr/share/squirrelmail $fs/var/lib/squirrelmail/data \
27 $fs/var/lib/squirrelmail/attach $fs/etc
28 cp -a $src/. $fs/usr/share/squirrelmail
29 sed -i "s/'custom_css', 'none'/'custom_css', 'serif-12.css'/" \
30 $fs/usr/share/squirrelmail/include/load_prefs.php
31 mv $fs/usr/share/squirrelmail/config $fs/etc/squirrelmail
32 ln -s /etc/squirrelmail $fs/usr/share/squirrelmail/config
33 mv $fs/etc/squirrelmail/config_default.* $fs/etc/squirrelmail/config.php
34 for i in demo test fortune; do
35 rm -rf $fs/usr/share/squirrelmail/plugins/$i
36 done
37 for i in $( cd $fs/usr/share/squirrelmail/plugins/ ; ls -d */ ); do
38 echo "\$plugins[] = '${i%/}';"
39 done >> $fs/etc/squirrelmail/config_local.php
40 sed -i -e "s|\$domain = 'example.com'|\$domain = 'localhost'|" \
41 -e 's|/var/local|/var/lib|g' $fs/etc/squirrelmail/config.php
42 chown -R www.www $fs/usr/share/squirrelmail $fs/etc/squirrelmail \
43 $fs/var/lib/squirrelmail
44 chmod 700 $fs/etc/squirrelmail
46 # Package all squirrelmail pkgs
47 if [ -x /usr/bin/cook ]; then
48 cook squirrelmail-locales
49 for i in $(cd $WOK; ls -d squirrelmail-*)
50 do
51 cook $i
52 done
53 fi
54 }
56 post_install()
57 {
58 #echo "Update /short_open_tag in /etc/php.ini"
59 #sed -i 's/^short_open_tag.*/short_open_tag = On/' /etc/php.ini
60 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
61 if ! grep -q /usr/share/squirrelmail/ "$1/etc/lighttpd/lighttpd.conf"; then
62 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squirrelmail/" => "/usr/share/squirrelmail/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
63 if [ -z "$1" ]; then
64 # Start Web server.
65 /etc/init.d/lighttpd stop
66 /etc/init.d/lighttpd start
67 fi
68 fi
69 fi
70 # Configure apache server
71 if [ -f "$1/etc/apache/httpd.conf" ]; then
72 if [ ! -f "$1/etc/apache/conf.d/squirrelmail" ]; then
73 cat > "$1/etc/apache/conf.d/squirrelmail" <<EOT
74 <IfModule mod_alias.c>
75 Alias /squirrelmail /usr/share/squirrelmail
76 </IfModule>
77 <DirectoryMatch /usr/share/squirrelmail/>
78 DirectoryIndex index.php
79 Options +FollowSymLinks
80 AllowOverride None
81 Order allow,deny
82 Allow from all
83 </DirectoryMatch>
84 EOT
85 if [ -z "$1" ]; then
86 # Start Web server.
87 /etc/init.d/apache restart
88 fi
89 fi
90 fi
91 }