wok-current view squirrelmail/receipt @ rev 1854

Cleanup ndiswrapper.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sun Dec 14 11:35:45 2008 +0100 (2008-12-14)
parents a98dc85bb99a
children bd6010223726
line source
1 # SliTaz package receipt.
3 PACKAGE="squirrelmail"
4 VERSION="1.4.15"
5 CATEGORY="network"
6 SHORT_DESC="Web mail."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$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 for i in $(cd $WOK; ls -d squirrelmail-*)
38 do
39 grep -q '^WANTED=' $WOK/$i/receipt || tazwok cook $i
40 done
41 for i in $(cd $WOK; grep -l '^WANTED="squirrelmail"$' \
42 squirrelmail-*/receipt)
43 do
44 tazwok genpkg ${i%/receipt}
45 done
46 }
48 post_install()
49 {
50 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
51 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
52 etc/squirrelmail/config.php
53 etc/squirrelmail/config_local.php
54 EOT
55 #echo "Update /short_open_tag in /etc/php.ini"
56 #sed -i 's/^short_open_tag.*/short_open_tag = On/' /etc/php.ini
57 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
58 if ! grep -q /usr/share/squirrelmail/ $1/etc/lighttpd/lighttpd.conf; then
59 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squirrelmail/" => "/usr/share/squirrelmail/",|g' -i $1/etc/lighttpd/lighttpd.conf
60 if [ -z "$1" ]; then
61 # Start Web server.
62 /etc/init.d/lighttpd stop
63 /etc/init.d/lighttpd start
64 fi
65 fi
66 fi
67 # Configure apache server
68 if [ -f $1/etc/apache/httpd.conf ]; then
69 if [ ! -f $1/etc/apache/conf.d/squirrelmail ]; then
70 cat > $1/etc/apache/conf.d/squirrelmail <<EOT
71 <IfModule mod_alias.c>
72 Alias /squirrelmail /usr/share/squirrelmail
73 </IfModule>
74 <DirectoryMatch /usr/share/squirrelmail/>
75 DirectoryIndex index.php
76 Options +FollowSymLinks
77 AllowOverride None
78 Order allow,deny
79 Allow from all
80 </DirectoryMatch>
81 EOT
82 if [ -z "$1" ]; then
83 # Start Web server.
84 /etc/init.d/apache restart
85 fi
86 fi
87 fi
88 }
90 repack_cleanup()
91 {
92 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
93 }