wok-next view squirrelmail/receipt @ rev 21097

gtk-girepository: forgot to remove HOST_ARCH="any"
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Jan 01 13:46:24 2019 +0200 (2019-01-01)
parents c4e53a39395a
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 WEB_SITE="http://www.squirrelmail.org/"
11 TARBALL="$PACKAGE-webmail-$VERSION.tar.bz2"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 genpkg_rules() {
15 mkdir -p $fs/usr/share/squirrelmail $fs/var/lib/squirrelmail/data \
16 $fs/var/lib/squirrelmail/attach $fs/etc
17 cp -a $src/. $fs/usr/share/squirrelmail
18 sed -i "s/'custom_css', 'none'/'custom_css', 'serif-12.css'/" \
19 $fs/usr/share/squirrelmail/include/load_prefs.php
20 mv $fs/usr/share/squirrelmail/config $fs/etc/squirrelmail
21 ln -s /etc/squirrelmail $fs/usr/share/squirrelmail/config
22 mv $fs/etc/squirrelmail/config_default.* $fs/etc/squirrelmail/config.php
23 for i in demo test fortune; do
24 rm -rf $fs/usr/share/squirrelmail/plugins/$i
25 done
26 for i in $( cd $fs/usr/share/squirrelmail/plugins/; ls -d */ ); do
27 echo "\$plugins[] = '${i%/}';"
28 done >> $fs/etc/squirrelmail/config_local.php
29 sed -i -e "s|\$domain = 'example.com'|\$domain = 'localhost'|" \
30 -e 's|/var/local|/var/lib|g' $fs/etc/squirrelmail/config.php
31 chown -R www.www $fs/usr/share/squirrelmail $fs/etc/squirrelmail \
32 $fs/var/lib/squirrelmail
33 chmod 700 $fs/etc/squirrelmail
35 # Package all squirrelmail pkgs
36 if [ -x /usr/bin/cook ]; then
37 cook squirrelmail-locales
38 for i in $(cd $WOK; ls -d squirrelmail-*)
39 do
40 cook $i
41 done
42 fi
44 DEPENDS="php"
45 CONFIG_FILES="/etc/squirrelmail/config.php /etc/squirrelmail/config_local.php"
46 }
48 post_install() {
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 }