wok-6.x annotate postfixadmin/receipt @ rev 21697

updated postfixadmin (2.3.5 -> 3.2)
author Hans-G?nter Theisgen
date Wed Jun 05 17:09:07 2019 +0100 (2019-06-05)
parents 9e01bc6321ea
children 309a56b97699
rev   line source
pascal@7824 1 # SliTaz package receipt.
pascal@7824 2
pascal@7824 3 PACKAGE="postfixadmin"
Hans-G?nter@21697 4 VERSION="3.2"
pascal@7824 5 CATEGORY="network"
pascal@7824 6 SHORT_DESC="Postfix web administration."
pascal@7824 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15375 8 LICENSE="GPL"
Hans-G?nter@21697 9 WEB_SITE="http://postfixadmin.sourceforge.net/"
Hans-G?nter@21697 10
pascal@7824 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@7824 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
Hans-G?nter@21697 13
erjo@12150 14 DEPENDS="php php-mysqli php-imap postfix mysql_or_postgresql"
pascal@7824 15
pascal@7824 16 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@7824 17 genpkg_rules()
pascal@7824 18 {
erjo@12150 19 mkdir -p $fs/usr/share/postfixadmin \
erjo@12150 20 $fs/etc/postfixadmin \
erjo@12150 21 $fs/usr/share/doc/postfixadmin \
erjo@12150 22 $fs/usr/lib/postfixadmin
erjo@12150 23
pascal@7824 24 cp -a $src/* $fs/usr/share/postfixadmin/
erjo@12041 25 mv $fs/usr/share/postfixadmin/config.inc.php $fs/etc/postfixadmin
erjo@12041 26 ln -s /etc/postfixadmin/config.inc.php $fs/usr/share/postfixadmin/config.inc.php
erjo@12041 27 sed -i 's/false/true/' $fs/etc/postfixadmin/config.inc.php
erjo@12041 28
erjo@12150 29 # Remove unwanted files
erjo@12150 30 rm -rf $fs/usr/share/postfixadmin/debian
erjo@12150 31
erjo@12150 32 # Move docs
erjo@12150 33 mv $fs/usr/share/postfixadmin/*.TXT $fs/usr/share/doc/postfixadmin
erjo@12150 34 mv $fs/usr/share/postfixadmin/DOCUMENTS $fs/usr/share/doc/postfixadmin
erjo@12150 35 mv $fs/usr/share/postfixadmin/ADDITIONS/* $fs/usr/lib/postfixadmin
erjo@12150 36 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/*.pl $fs/usr/lib/postfixadmin
erjo@12150 37 mv $fs/usr/share/postfixadmin/VIRTUAL_VACATION/ $fs/usr/share/doc/postfixadmin
erjo@12150 38
erjo@12150 39 rm -rf $fs/usr/share/postfixadmin/ADDITIONS
erjo@12150 40
erjo@12041 41 # Fix group
erjo@12041 42 chown -R root.root $fs/usr/share/postfixadmin/
pascal@7824 43 }
pascal@7824 44
pascal@7824 45 post_install()
pascal@7824 46 {
pascal@7824 47 # Configure lighttpd server
pascal@18730 48 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 49 if ! grep -q /usr/share/postfixadmin/ "$1/etc/lighttpd/lighttpd.conf"; then
pascal@18730 50 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
pascal@7824 51 if [ -z "$1" ]; then
pascal@7824 52 # Start Web server.
pascal@7824 53 /etc/init.d/lighttpd stop
pascal@7824 54 /etc/init.d/lighttpd start
pascal@7824 55 fi
pascal@7824 56 fi
pascal@7824 57 fi
pascal@7824 58 # Configure apache server
pascal@18730 59 if [ -f "$1/etc/apache/httpd.conf" ]; then
pascal@18730 60 if [ ! -f "$1/etc/apache/conf.d/postfixadmin" ]; then
pascal@18730 61 cat > "$1/etc/apache/conf.d/postfixadmin" <<EOT
pascal@7824 62 <IfModule mod_alias.c>
pascal@7824 63 Alias /postfixadmin /usr/share/postfixadmin
pascal@7824 64 </IfModule>
pascal@7824 65 <DirectoryMatch /usr/share/postfixadmin/>
pascal@7824 66 DirectoryIndex index.php
pascal@7824 67 Options +FollowSymLinks
pascal@7824 68 AllowOverride None
pascal@7824 69 Order allow,deny
pascal@7824 70 Allow from all
pascal@7824 71 </DirectoryMatch>
pascal@7824 72 EOT
pascal@7824 73 if [ -z "$1" ]; then
pascal@7824 74 # Start Web server.
pascal@7824 75 /etc/init.d/apache stop
pascal@7824 76 /etc/init.d/apache start
pascal@7824 77 fi
pascal@7824 78 fi
pascal@7824 79 fi
pascal@7824 80 }