wok-6.x annotate squirrelmail/receipt @ rev 25235
updated python-serial (3.4 -> 3.5)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Jul 13 17:36:30 2022 +0100 (2022-07-13) |
parents | 46dcc80bef41 |
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" |
pascal@1198 | 6 SHORT_DESC="Web mail." |
pascal@1198 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15200 | 8 LICENSE="GPL2" |
slaxemulator@11016 | 9 TARBALL="$PACKAGE-webmail-$VERSION.tar.bz2" |
pascal@24746 | 10 WEB_SITE="https://www.squirrelmail.org/" |
pascal@1198 | 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@15200 | 12 CONFIG_FILES="/etc/squirrelmail/config.php /etc/squirrelmail/config_local.php" |
pascal@16264 | 13 HOST_ARCH="any" |
pascal@15200 | 14 |
pascal@1224 | 15 DEPENDS="php" |
pascal@1198 | 16 |
pascal@24094 | 17 current_version() |
pascal@24094 | 18 { |
pascal@24094 | 19 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24094 | 20 sed '/Released/!d;s|.*SquirrelMail ||;s| Released.*||;q' |
pascal@24094 | 21 } |
pascal@24094 | 22 |
pascal@1198 | 23 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1198 | 24 genpkg_rules() |
pascal@1198 | 25 { |
pascal@1198 | 26 mkdir -p $fs/usr/share/squirrelmail $fs/var/lib/squirrelmail/data \ |
pascal@1198 | 27 $fs/var/lib/squirrelmail/attach $fs/etc |
pascal@1198 | 28 cp -a $src/. $fs/usr/share/squirrelmail |
pascal@1224 | 29 sed -i "s/'custom_css', 'none'/'custom_css', 'serif-12.css'/" \ |
pascal@1224 | 30 $fs/usr/share/squirrelmail/include/load_prefs.php |
pascal@1198 | 31 mv $fs/usr/share/squirrelmail/config $fs/etc/squirrelmail |
pascal@1198 | 32 ln -s /etc/squirrelmail $fs/usr/share/squirrelmail/config |
pascal@1198 | 33 mv $fs/etc/squirrelmail/config_default.* $fs/etc/squirrelmail/config.php |
pascal@1201 | 34 for i in demo test fortune; do |
pascal@1201 | 35 rm -rf $fs/usr/share/squirrelmail/plugins/$i |
pascal@1201 | 36 done |
pascal@1201 | 37 for i in $( cd $fs/usr/share/squirrelmail/plugins/ ; ls -d */ ); do |
pascal@1201 | 38 echo "\$plugins[] = '${i%/}';" |
pascal@1201 | 39 done >> $fs/etc/squirrelmail/config_local.php |
pascal@1198 | 40 sed -i -e "s|\$domain = 'example.com'|\$domain = 'localhost'|" \ |
pascal@1198 | 41 -e 's|/var/local|/var/lib|g' $fs/etc/squirrelmail/config.php |
pascal@1198 | 42 chown -R www.www $fs/usr/share/squirrelmail $fs/etc/squirrelmail \ |
pascal@1198 | 43 $fs/var/lib/squirrelmail |
pascal@1198 | 44 chmod 700 $fs/etc/squirrelmail |
gokhlayeh@11398 | 45 |
pascal@1199 | 46 # Package all squirrelmail pkgs |
gokhlayeh@11398 | 47 if [ -x /usr/bin/cook ]; then |
gokhlayeh@11398 | 48 cook squirrelmail-locales |
gokhlayeh@11398 | 49 for i in $(cd $WOK; ls -d squirrelmail-*) |
gokhlayeh@11398 | 50 do |
gokhlayeh@11398 | 51 cook $i |
gokhlayeh@11398 | 52 done |
gokhlayeh@11398 | 53 fi |
pascal@1198 | 54 } |
pascal@1198 | 55 |
pascal@1198 | 56 post_install() |
pascal@1198 | 57 { |
pascal@1224 | 58 #echo "Update /short_open_tag in /etc/php.ini" |
pascal@1224 | 59 #sed -i 's/^short_open_tag.*/short_open_tag = On/' /etc/php.ini |
pascal@18730 | 60 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@18730 | 61 if ! grep -q /usr/share/squirrelmail/ "$1/etc/lighttpd/lighttpd.conf"; then |
pascal@18730 | 62 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 | 63 if [ -z "$1" ]; then |
pascal@1198 | 64 # Start Web server. |
pascal@1198 | 65 /etc/init.d/lighttpd stop |
pascal@1198 | 66 /etc/init.d/lighttpd start |
pascal@1198 | 67 fi |
pascal@1198 | 68 fi |
pascal@1198 | 69 fi |
pascal@1428 | 70 # Configure apache server |
pascal@18730 | 71 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@18730 | 72 if [ ! -f "$1/etc/apache/conf.d/squirrelmail" ]; then |
pascal@18730 | 73 cat > "$1/etc/apache/conf.d/squirrelmail" <<EOT |
pascal@1428 | 74 <IfModule mod_alias.c> |
pascal@1428 | 75 Alias /squirrelmail /usr/share/squirrelmail |
pascal@1428 | 76 </IfModule> |
pascal@1428 | 77 <DirectoryMatch /usr/share/squirrelmail/> |
pascal@1428 | 78 DirectoryIndex index.php |
pascal@1428 | 79 Options +FollowSymLinks |
pascal@1428 | 80 AllowOverride None |
pascal@1428 | 81 Order allow,deny |
pascal@1428 | 82 Allow from all |
pascal@1428 | 83 </DirectoryMatch> |
pascal@1428 | 84 EOT |
pascal@1428 | 85 if [ -z "$1" ]; then |
pascal@1428 | 86 # Start Web server. |
pascal@1428 | 87 /etc/init.d/apache restart |
pascal@1428 | 88 fi |
pascal@1428 | 89 fi |
pascal@1428 | 90 fi |
pascal@1198 | 91 } |