# HG changeset patch # User Pascal Bellard # Date 1293361329 -3600 # Node ID 3b8f83d1099508f16063e3e2a34766dc97fcd4bb # Parent 5407406663a37e4da934a3055f50c904a9e28756 Add postfixadmin diff -r 5407406663a3 -r 3b8f83d10995 postfixadmin/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/postfixadmin/receipt Sun Dec 26 12:02:09 2010 +0100 @@ -0,0 +1,64 @@ +# SliTaz package receipt. + +PACKAGE="postfixadmin" +VERSION="2.3.2" +CATEGORY="network" +SHORT_DESC="Postfix web administration." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://postfixadmin.sourceforge.net/" +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" +DEPENDS="php postfix mysql_or_postgresql" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share/postfixadmin $fs/etc/postfix + cp -a $src/* $fs/usr/share/postfixadmin/ + mv $fs/usr/share/postfixadmin/config.inc.php $fs/etc/postfix/postfixadmin.php + ln -s /etc/postfix/postfixadmin.php $fs/usr/share/postfixadmin/config.inc.php + sed -i 's/false/true/' $fs/etc/postfix/postfixadmin.php +} + +post_install() +{ + # Configure lighttpd server + if [ -f $1/etc/lighttpd/lighttpd.conf ]; then + if ! grep -q /usr/share/postfixadmin/ $1/etc/lighttpd/lighttpd.conf; then + sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf + if [ -z "$1" ]; then + # Start Web server. + /etc/init.d/lighttpd stop + /etc/init.d/lighttpd start + fi + fi + fi + # Configure apache server + if [ -f $1/etc/apache/httpd.conf ]; then + if [ ! -f $1/etc/apache/conf.d/postfixadmin ]; then + cat > $1/etc/apache/conf.d/postfixadmin < + Alias /postfixadmin /usr/share/postfixadmin + + + DirectoryIndex index.php + Options +FollowSymLinks + AllowOverride None + Order allow,deny + Allow from all + +EOT + if [ -z "$1" ]; then + # Start Web server. + /etc/init.d/apache stop + /etc/init.d/apache start + fi + fi + fi +} diff -r 5407406663a3 -r 3b8f83d10995 postfixadmin/stuff/etc/mysql.d/postfixadmin --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/postfixadmin/stuff/etc/mysql.d/postfixadmin Sun Dec 26 12:02:09 2010 +0100 @@ -0,0 +1,9 @@ +#!/bin/sh + +mysqldump postfix > /dev/null 2>&1 || mysql <