wok annotate postfixadmin/receipt @ rev 12041

Up: postfixadmn (2.3.5) + improve package
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Wed Mar 07 17:39:37 2012 +0100 (2012-03-07)
parents 9480baa0a8b0
children c4e464160942
rev   line source
pascal@7824 1 # SliTaz package receipt.
pascal@7824 2
pascal@7824 3 PACKAGE="postfixadmin"
erjo@12041 4 VERSION="2.3.5"
pascal@7824 5 CATEGORY="network"
pascal@7824 6 SHORT_DESC="Postfix web administration."
pascal@7824 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@7824 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@7824 9 WEB_SITE="http://postfixadmin.sourceforge.net/"
pascal@7824 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@7824 11 DEPENDS="php postfix mysql_or_postgresql"
pascal@7824 12
pascal@7824 13 # Rules to configure and make the package.
pascal@7824 14 compile_rules()
pascal@7824 15 {
pascal@7824 16 cd $src
pascal@7824 17 }
pascal@7824 18
pascal@7824 19 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@7824 20 genpkg_rules()
pascal@7824 21 {
erjo@12041 22 mkdir -p $fs/usr/share/postfixadmin $fs/etc/postfixadmin
pascal@7824 23 cp -a $src/* $fs/usr/share/postfixadmin/
erjo@12041 24 mv $fs/usr/share/postfixadmin/config.inc.php $fs/etc/postfixadmin
erjo@12041 25 ln -s /etc/postfixadmin/config.inc.php $fs/usr/share/postfixadmin/config.inc.php
erjo@12041 26 sed -i 's/false/true/' $fs/etc/postfixadmin/config.inc.php
erjo@12041 27
erjo@12041 28 # Fix group
erjo@12041 29 chown -R root.root $fs/usr/share/postfixadmin/
pascal@7824 30 }
pascal@7824 31
pascal@7824 32 post_install()
pascal@7824 33 {
pascal@7824 34 # Configure lighttpd server
pascal@7824 35 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
pascal@7824 36 if ! grep -q /usr/share/postfixadmin/ $1/etc/lighttpd/lighttpd.conf; then
pascal@7824 37 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 38 if [ -z "$1" ]; then
pascal@7824 39 # Start Web server.
pascal@7824 40 /etc/init.d/lighttpd stop
pascal@7824 41 /etc/init.d/lighttpd start
pascal@7824 42 fi
pascal@7824 43 fi
pascal@7824 44 fi
pascal@7824 45 # Configure apache server
pascal@7824 46 if [ -f $1/etc/apache/httpd.conf ]; then
pascal@7824 47 if [ ! -f $1/etc/apache/conf.d/postfixadmin ]; then
pascal@7824 48 cat > $1/etc/apache/conf.d/postfixadmin <<EOT
pascal@7824 49 <IfModule mod_alias.c>
pascal@7824 50 Alias /postfixadmin /usr/share/postfixadmin
pascal@7824 51 </IfModule>
pascal@7824 52 <DirectoryMatch /usr/share/postfixadmin/>
pascal@7824 53 DirectoryIndex index.php
pascal@7824 54 Options +FollowSymLinks
pascal@7824 55 AllowOverride None
pascal@7824 56 Order allow,deny
pascal@7824 57 Allow from all
pascal@7824 58 </DirectoryMatch>
pascal@7824 59 EOT
pascal@7824 60 if [ -z "$1" ]; then
pascal@7824 61 # Start Web server.
pascal@7824 62 /etc/init.d/apache stop
pascal@7824 63 /etc/init.d/apache start
pascal@7824 64 fi
pascal@7824 65 fi
pascal@7824 66 fi
pascal@7824 67 }