wok-next annotate squirrelmail/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | c4e53a39395a |
children |
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" |
al@21020 | 6 SHORT_DESC="Web mail" |
pascal@1198 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15200 | 8 LICENSE="GPL2" |
al@21020 | 9 WEB_SITE="http://www.squirrelmail.org/" |
al@21020 | 10 |
slaxemulator@11016 | 11 TARBALL="$PACKAGE-webmail-$VERSION.tar.bz2" |
pascal@1198 | 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@15200 | 13 |
al@21020 | 14 genpkg_rules() { |
pascal@1198 | 15 mkdir -p $fs/usr/share/squirrelmail $fs/var/lib/squirrelmail/data \ |
pascal@1198 | 16 $fs/var/lib/squirrelmail/attach $fs/etc |
pascal@1198 | 17 cp -a $src/. $fs/usr/share/squirrelmail |
pascal@1224 | 18 sed -i "s/'custom_css', 'none'/'custom_css', 'serif-12.css'/" \ |
pascal@1224 | 19 $fs/usr/share/squirrelmail/include/load_prefs.php |
pascal@1198 | 20 mv $fs/usr/share/squirrelmail/config $fs/etc/squirrelmail |
pascal@1198 | 21 ln -s /etc/squirrelmail $fs/usr/share/squirrelmail/config |
pascal@1198 | 22 mv $fs/etc/squirrelmail/config_default.* $fs/etc/squirrelmail/config.php |
pascal@1201 | 23 for i in demo test fortune; do |
pascal@1201 | 24 rm -rf $fs/usr/share/squirrelmail/plugins/$i |
pascal@1201 | 25 done |
al@21020 | 26 for i in $( cd $fs/usr/share/squirrelmail/plugins/; ls -d */ ); do |
pascal@1201 | 27 echo "\$plugins[] = '${i%/}';" |
pascal@1201 | 28 done >> $fs/etc/squirrelmail/config_local.php |
pascal@1198 | 29 sed -i -e "s|\$domain = 'example.com'|\$domain = 'localhost'|" \ |
pascal@1198 | 30 -e 's|/var/local|/var/lib|g' $fs/etc/squirrelmail/config.php |
pascal@1198 | 31 chown -R www.www $fs/usr/share/squirrelmail $fs/etc/squirrelmail \ |
pascal@1198 | 32 $fs/var/lib/squirrelmail |
pascal@1198 | 33 chmod 700 $fs/etc/squirrelmail |
gokhlayeh@11398 | 34 |
pascal@1199 | 35 # Package all squirrelmail pkgs |
gokhlayeh@11398 | 36 if [ -x /usr/bin/cook ]; then |
gokhlayeh@11398 | 37 cook squirrelmail-locales |
gokhlayeh@11398 | 38 for i in $(cd $WOK; ls -d squirrelmail-*) |
gokhlayeh@11398 | 39 do |
gokhlayeh@11398 | 40 cook $i |
gokhlayeh@11398 | 41 done |
gokhlayeh@11398 | 42 fi |
al@21020 | 43 |
al@21020 | 44 DEPENDS="php" |
al@21020 | 45 CONFIG_FILES="/etc/squirrelmail/config.php /etc/squirrelmail/config_local.php" |
pascal@1198 | 46 } |
pascal@1198 | 47 |
al@21020 | 48 post_install() { |
pascal@1224 | 49 #echo "Update /short_open_tag in /etc/php.ini" |
pascal@1224 | 50 #sed -i 's/^short_open_tag.*/short_open_tag = On/' /etc/php.ini |
pascal@18730 | 51 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@18730 | 52 if ! grep -q /usr/share/squirrelmail/ "$1/etc/lighttpd/lighttpd.conf"; then |
al@21020 | 53 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 | 54 if [ -z "$1" ]; then |
pascal@1198 | 55 # Start Web server. |
pascal@1198 | 56 /etc/init.d/lighttpd stop |
pascal@1198 | 57 /etc/init.d/lighttpd start |
pascal@1198 | 58 fi |
pascal@1198 | 59 fi |
pascal@1198 | 60 fi |
pascal@1428 | 61 # Configure apache server |
pascal@18730 | 62 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@18730 | 63 if [ ! -f "$1/etc/apache/conf.d/squirrelmail" ]; then |
pascal@18730 | 64 cat > "$1/etc/apache/conf.d/squirrelmail" <<EOT |
pascal@1428 | 65 <IfModule mod_alias.c> |
pascal@1428 | 66 Alias /squirrelmail /usr/share/squirrelmail |
pascal@1428 | 67 </IfModule> |
pascal@1428 | 68 <DirectoryMatch /usr/share/squirrelmail/> |
pascal@1428 | 69 DirectoryIndex index.php |
pascal@1428 | 70 Options +FollowSymLinks |
pascal@1428 | 71 AllowOverride None |
pascal@1428 | 72 Order allow,deny |
pascal@1428 | 73 Allow from all |
pascal@1428 | 74 </DirectoryMatch> |
pascal@1428 | 75 EOT |
pascal@1428 | 76 if [ -z "$1" ]; then |
pascal@1428 | 77 # Start Web server. |
pascal@1428 | 78 /etc/init.d/apache restart |
pascal@1428 | 79 fi |
pascal@1428 | 80 fi |
pascal@1428 | 81 fi |
pascal@1198 | 82 } |