wok-current annotate squirrelmail/receipt @ rev 11016
Up: squirrelmail to 1.4.22.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Oct 13 10:45:54 2011 +0000 (2011-10-13) |
parents | cf404562b727 |
children | f04a7db11ba8 |
rev | line source |
---|---|
pascal@1198 | 1 # SliTaz package receipt. |
pascal@1198 | 2 |
pascal@1198 | 3 PACKAGE="squirrelmail" |
slaxemulator@11016 | 4 VERSION="1.4.22" |
pascal@1198 | 5 CATEGORY="network" |
pascal@1198 | 6 SHORT_DESC="Web mail." |
pascal@1198 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
slaxemulator@11016 | 8 TARBALL="$PACKAGE-webmail-$VERSION.tar.bz2" |
pascal@1198 | 9 WEB_SITE="http://www.squirrelmail.org/" |
pascal@1198 | 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@1224 | 11 DEPENDS="php" |
pascal@1212 | 12 CONFIG_FILES="/etc/squirrelmail/config.php /etc/squirrelmail/config_local.php" |
pascal@1198 | 13 |
pascal@1198 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1198 | 15 genpkg_rules() |
pascal@1198 | 16 { |
pascal@1198 | 17 mkdir -p $fs/usr/share/squirrelmail $fs/var/lib/squirrelmail/data \ |
pascal@1198 | 18 $fs/var/lib/squirrelmail/attach $fs/etc |
pascal@1198 | 19 cp -a $src/. $fs/usr/share/squirrelmail |
pascal@1224 | 20 sed -i "s/'custom_css', 'none'/'custom_css', 'serif-12.css'/" \ |
pascal@1224 | 21 $fs/usr/share/squirrelmail/include/load_prefs.php |
pascal@1198 | 22 mv $fs/usr/share/squirrelmail/config $fs/etc/squirrelmail |
pascal@1198 | 23 ln -s /etc/squirrelmail $fs/usr/share/squirrelmail/config |
pascal@1198 | 24 mv $fs/etc/squirrelmail/config_default.* $fs/etc/squirrelmail/config.php |
pascal@1201 | 25 for i in demo test fortune; do |
pascal@1201 | 26 rm -rf $fs/usr/share/squirrelmail/plugins/$i |
pascal@1201 | 27 done |
pascal@1201 | 28 for i in $( cd $fs/usr/share/squirrelmail/plugins/ ; ls -d */ ); do |
pascal@1201 | 29 echo "\$plugins[] = '${i%/}';" |
pascal@1201 | 30 done >> $fs/etc/squirrelmail/config_local.php |
pascal@1198 | 31 sed -i -e "s|\$domain = 'example.com'|\$domain = 'localhost'|" \ |
pascal@1198 | 32 -e 's|/var/local|/var/lib|g' $fs/etc/squirrelmail/config.php |
pascal@1198 | 33 chown -R www.www $fs/usr/share/squirrelmail $fs/etc/squirrelmail \ |
pascal@1198 | 34 $fs/var/lib/squirrelmail |
pascal@1198 | 35 chmod 700 $fs/etc/squirrelmail |
pascal@1199 | 36 # Package all squirrelmail pkgs |
slaxemulator@11016 | 37 cook squirrelmail-locales |
pascal@1198 | 38 for i in $(cd $WOK; ls -d squirrelmail-*) |
pascal@1198 | 39 do |
slaxemulator@11016 | 40 cook $i |
pascal@1198 | 41 done |
pascal@1198 | 42 } |
pascal@1198 | 43 |
pascal@1198 | 44 post_install() |
pascal@1198 | 45 { |
pascal@1224 | 46 #echo "Update /short_open_tag in /etc/php.ini" |
pascal@1224 | 47 #sed -i 's/^short_open_tag.*/short_open_tag = On/' /etc/php.ini |
pascal@1198 | 48 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@1198 | 49 if ! grep -q /usr/share/squirrelmail/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@1198 | 50 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squirrelmail/" => "/usr/share/squirrelmail/",|g' -i $1/etc/lighttpd/lighttpd.conf |
pascal@1198 | 51 if [ -z "$1" ]; then |
pascal@1198 | 52 # Start Web server. |
pascal@1198 | 53 /etc/init.d/lighttpd stop |
pascal@1198 | 54 /etc/init.d/lighttpd start |
pascal@1198 | 55 fi |
pascal@1198 | 56 fi |
pascal@1198 | 57 fi |
pascal@1428 | 58 # Configure apache server |
pascal@1428 | 59 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@1428 | 60 if [ ! -f $1/etc/apache/conf.d/squirrelmail ]; then |
pascal@1428 | 61 cat > $1/etc/apache/conf.d/squirrelmail <<EOT |
pascal@1428 | 62 <IfModule mod_alias.c> |
pascal@1428 | 63 Alias /squirrelmail /usr/share/squirrelmail |
pascal@1428 | 64 </IfModule> |
pascal@1428 | 65 <DirectoryMatch /usr/share/squirrelmail/> |
pascal@1428 | 66 DirectoryIndex index.php |
pascal@1428 | 67 Options +FollowSymLinks |
pascal@1428 | 68 AllowOverride None |
pascal@1428 | 69 Order allow,deny |
pascal@1428 | 70 Allow from all |
pascal@1428 | 71 </DirectoryMatch> |
pascal@1428 | 72 EOT |
pascal@1428 | 73 if [ -z "$1" ]; then |
pascal@1428 | 74 # Start Web server. |
pascal@1428 | 75 /etc/init.d/apache restart |
pascal@1428 | 76 fi |
pascal@1428 | 77 fi |
pascal@1428 | 78 fi |
pascal@1198 | 79 } |