summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-mail/postfixadmin/ChangeLog8
-rw-r--r--net-mail/postfixadmin/Manifest14
-rw-r--r--net-mail/postfixadmin/files/config-hook.sh10
-rw-r--r--net-mail/postfixadmin/files/digest-postfixadmin-2.1.0-r23
-rw-r--r--net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-1.patch12
-rw-r--r--net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-2.patch14
-rw-r--r--net-mail/postfixadmin/files/postinstall-en-mysql.txt18
-rw-r--r--net-mail/postfixadmin/files/postinstall-en-postgres.txt19
-rw-r--r--net-mail/postfixadmin/files/postinstall-en.txt45
-rw-r--r--net-mail/postfixadmin/postfixadmin-2.1.0-r2.ebuild110
-rw-r--r--net-mail/postfixadmin/postfixadmin-2.2.0_rc3.ebuild115
11 files changed, 180 insertions, 188 deletions
diff --git a/net-mail/postfixadmin/ChangeLog b/net-mail/postfixadmin/ChangeLog
index bbc9dcd..4498b36 100644
--- a/net-mail/postfixadmin/ChangeLog
+++ b/net-mail/postfixadmin/ChangeLog
@@ -2,6 +2,14 @@
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/www-apps/postfixadmin/ChangeLog,v 1.1 2006/02/02 19:35:13 wrobel Exp $
+ 04 Mar 2008; Jakub Moc <jakub@gentoo.org>
+ files/postfixadmin-2.1.0-postgres-1.patch,
+ files/postfixadmin-2.1.0-postgres-2.patch, -files/config-hook.sh,
+ -files/postinstall-en.txt, +files/postinstall-en-mysql.txt,
+ +files/postinstall-en-postgres.txt, -postfixadmin-2.1.0-r2.ebuild,
+ +postfixadmin-2.2.0_rc3.ebuild:
+ Version bump, remove old.
+
23 Feb 2008; Jakub Moc <jakub@gentoo.org> postfixadmin-2.1.0-r2.ebuild:
Use ecvs_clean from eutils eclass, fix deps, quoting
diff --git a/net-mail/postfixadmin/Manifest b/net-mail/postfixadmin/Manifest
index 30eb6de..d5c39f7 100644
--- a/net-mail/postfixadmin/Manifest
+++ b/net-mail/postfixadmin/Manifest
@@ -1,9 +1,9 @@
-AUX config-hook.sh 202 RMD160 5330c8319a0b4b1d89ceee9eb3d7adac0a046034 SHA1 84efe994c7c82b4ed16f9b1b6b51e09c26fd95d4 SHA256 a80dc6ea1f7144391e76029d857c2cf5f0554c4feb49613af6ed09ba2c84c565
-AUX postfixadmin-2.1.0-postgres-1.patch 3372 RMD160 e13163d0abdba9fc14ab04ac4a0be4c880d171de SHA1 1938ff94c2a0d0ae401cc819d95183c4a0241d87 SHA256 9dc87737720b23e8390af22bb1919d8b21203aa4ce57df2f80d14685d0851568
-AUX postfixadmin-2.1.0-postgres-2.patch 8555 RMD160 79ae220fa85442aa85c3618cf833cafe88ece247 SHA1 8ce951bd0c7b0fd433145fc93b5f9b22618ba3e8 SHA256 06d310237c15d4bbff303c349f6123cd2b00ec367e296a7a376a8f3ed5e6c627
+AUX postfixadmin-2.1.0-postgres-1.patch 3304 RMD160 afaee57dd0c960442cef37c2fda370245302a402 SHA1 90dcb24c08fedd3ffd332510ab570020439fb4ae SHA256 2668a59ba25b8a1d7cb7ba6cd9da625d85a0de8e588fd337ff7dccaef67644f0
+AUX postfixadmin-2.1.0-postgres-2.patch 8519 RMD160 c4f759af43a37e7dc38c592241d6c10b279f6b5a SHA1 d8bd142f292653828a64399338480c83332b7b08 SHA256 8018ee6dda4d9fb8724d31e7600c506d03320a7e495920be448f5c41c9783a66
AUX postfixadmin-2.1.0-postgres-3.patch 1623 RMD160 efbe95eda2cfa1ca465cda8574b76240b02594fc SHA1 d34ac67e3dcc208ebb56739b9903c2e5f67f12ef SHA256 95a5ffbf48a8efce7aeaba264caeac4757063ac1863661f7b4f285babf6fc712
-AUX postinstall-en.txt 1859 RMD160 8ba29b5fae66503e38b822fe0f483a688935b6a3 SHA1 214df1f8404bcdfc97712798d4d8e60569512861 SHA256 a8d58a82e734ce28acf3cc5730805c7db7ebb54cbb6eeff67dd379cb8a6f234e
-DIST postfixadmin-2.1.0.tgz 160525 RMD160 a90773bcfd9caa0a197fb11a39ac1350a053ebc2 SHA1 9c87962a543df7639a547a021d192998e5c96ca2 SHA256 8c34f17b91c1f82923b8fc3f0fb73716e853f874b2015998a975bd9909029a44
-EBUILD postfixadmin-2.1.0-r2.ebuild 3419 RMD160 ba1e1a5a2460f72bac3774718bf9d1a9166269d8 SHA1 8c24beb68f72697e2080890d0056d7f89efdb88e SHA256 c1a4b8d978e4179c451bef8a37b44d106206990e49eb184eeff54d7027b5ef3f
-MISC ChangeLog 1329 RMD160 1e8b2799e4827336db4e44542d137e508000a8bb SHA1 fa27111488208c93952ec6872d84b80f5665ec49 SHA256 1edabc78b451bfed2989eb4ae42844ba1e77ea30df1876ce9d7a4d9a11d281ec
+AUX postinstall-en-mysql.txt 805 RMD160 f617799c8b2f2360e10c76a136ce55979dcdea44 SHA1 5756ed9c4a9998549cc1201a23be8d83ffe45694 SHA256 711fd51bde7eb0c7ad4b52b7829499c494358b36686a817561669e4845dc3b1c
+AUX postinstall-en-postgres.txt 838 RMD160 d79996b85fac3c31ccb155274824b521ec7cfecb SHA1 19a068a8fde66fbc19f461d2c7b6f9a1e44c781f SHA256 4604a50c0a4c6b33e67593ccd4c338efb8aecacc1ea2a6f8f7480ee048db17f2
+DIST postfixadmin-2.2.0-rc3.tar.gz 980137 RMD160 823aee6c39384a9a614d900a5f04f50d9364716d SHA1 f5c1e43154c569411ed04785601bd0a307a4d01d SHA256 d671997acec12c722fde40113d824b53b9979f44c21b163cd211497af4563c20
+EBUILD postfixadmin-2.2.0_rc3.ebuild 3265 RMD160 0ab2a1bca0d1c9fdf388450c6dfe9ad335829ccd SHA1 1f78cc3395b947ec8df2cb0962e2474a96d89fde SHA256 47073b6c992dd3cf76b641e00e86c03e4ade4fd83d9bfd26af8d5103ac61f456
+MISC ChangeLog 1680 RMD160 486010f280cae40a165cc65bad58c352beec5a45 SHA1 0b89df9980543dd91fbd8417cd8826f7f138ff4b SHA256 9232857fb50266bbf01790658244fe5f75a770afa7a524cfc56ddf0c0bf751e4
MISC metadata.xml 300 RMD160 bf586296c9109dde24954321b649d4209515a655 SHA1 4d51a604920a4063599ce594e66c89bade642e2b SHA256 ede26e0fd846cfff8f6fbe5207a5f62606d3fdd8b7dd36fbc7eca81f5059c9e9
diff --git a/net-mail/postfixadmin/files/config-hook.sh b/net-mail/postfixadmin/files/config-hook.sh
deleted file mode 100644
index bc22227..0000000
--- a/net-mail/postfixadmin/files/config-hook.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-case "$1" in
- install)
- sed -i "s:^\(AuthUserFile \).*$:\1${MY_INSTALLDIR}/admin/.htpasswd:gI" ${MY_INSTALLDIR}/admin/.htaccess || exit
- ;;
- *)
- # Nothing to do for clean up
- ;;
-esac
diff --git a/net-mail/postfixadmin/files/digest-postfixadmin-2.1.0-r2 b/net-mail/postfixadmin/files/digest-postfixadmin-2.1.0-r2
deleted file mode 100644
index 69c0e10..0000000
--- a/net-mail/postfixadmin/files/digest-postfixadmin-2.1.0-r2
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 89043e52796298f44a06d65eaddaef09 postfixadmin-2.1.0.tgz 160525
-RMD160 a90773bcfd9caa0a197fb11a39ac1350a053ebc2 postfixadmin-2.1.0.tgz 160525
-SHA256 8c34f17b91c1f82923b8fc3f0fb73716e853f874b2015998a975bd9909029a44 postfixadmin-2.1.0.tgz 160525
diff --git a/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-1.patch b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-1.patch
index 88bafcf..5ee0807 100644
--- a/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-1.patch
+++ b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-1.patch
@@ -1,6 +1,6 @@
-diff -aur pfa/languages/it.lang postfixAdmin/languages/it.lang
---- pfa/languages/it.lang 2006-02-08 19:00:49.170559750 +0100
-+++ postfixAdmin/languages/it.lang 2006-02-08 17:42:17.462480000 +0100
+diff -aur languages/it.lang languages/it.lang
+--- languages/it.lang 2006-02-08 19:00:49.170559750 +0100
++++ languages/it.lang 2006-02-08 17:42:17.462480000 +0100
@@ -156,16 +156,16 @@
$PALANG['pSendmail_result_error'] = '<span class="error_msg">Impossibile creare la casella di posta!</span>';
$PALANG['pSendmail_result_succes'] = 'La casella di posta&egrave; stata creata!';
@@ -36,9 +36,9 @@ diff -aur pfa/languages/it.lang postfixAdmin/languages/it.lang
$PALANG['pAdminCreate_domain_aliases'] = 'Alias';
$PALANG['pAdminCreate_domain_aliases_text'] = '-1 = disabilita | 0 = illimitati';
$PALANG['pAdminCreate_domain_mailboxes'] = 'Caselle di posta';
-diff -aur pfa/templates/admin_list-admin.tpl postfixAdmin/templates/admin_list-admin.tpl
---- pfa/templates/admin_list-admin.tpl 2006-02-08 19:00:50.022613000 +0100
-+++ postfixAdmin/templates/admin_list-admin.tpl 2006-02-08 18:47:26.551992250 +0100
+diff -aur templates/admin_list-admin.php templates/admin_list-admin.php
+--- templates/admin_list-admin.php 2006-02-08 19:00:50.022613000 +0100
++++ templates/admin_list-admin.php 2006-02-08 18:47:26.551992250 +0100
@@ -18,7 +18,7 @@
print " <td><a href=\"list-domain.php?username=" . $list_admins[$i] . "\">" . $list_admins[$i] . "</a></td>";
print " <td>" . $admin_properties[$i]['domain_count'] . "</td>";
diff --git a/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-2.patch b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-2.patch
index 3b21e2d..9e29891 100644
--- a/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-2.patch
+++ b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-2.patch
@@ -1,6 +1,6 @@
-diff -aNru pfa/admin/create-admin.php postfixAdmin/admin/create-admin.php
---- pfa/admin/create-admin.php 2006-02-08 19:00:47.510456000 +0100
-+++ postfixAdmin/admin/create-admin.php 2006-02-09 16:07:48.646646750 +0100
+diff -aNru templates/create-admin.php templates/create-admin.php
+--- templates/create-admin.php 2006-02-08 19:00:47.510456000 +0100
++++ templates/create-admin.php 2006-02-09 16:07:48.646646750 +0100
@@ -79,7 +79,7 @@
$pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text'];
@@ -10,9 +10,9 @@ diff -aNru pfa/admin/create-admin.php postfixAdmin/admin/create-admin.php
if ($result['rows'] != 1)
{
$tMessage = $PALANG['pAdminCreate_admin_result_error'] . "<br />($fUsername)<br />";
-diff -aNru pfa/admin/create-domain.php postfixAdmin/admin/create-domain.php
---- pfa/admin/create-domain.php 2006-02-08 19:00:47.574460000 +0100
-+++ postfixAdmin/admin/create-domain.php 2006-02-09 16:05:24.385631000 +0100
+diff -aNru templates/create-domain.php templates/create-domain.php
+--- templates/create-domain.php 2006-02-08 19:00:47.574460000 +0100
++++ templates/create-domain.php 2006-02-09 16:05:24.385631000 +0100
@@ -81,14 +81,14 @@
$fAliases = -1;
$fMailboxes = -1;
@@ -31,7 +31,7 @@ diff -aNru pfa/admin/create-domain.php postfixAdmin/admin/create-domain.php
if ($result['rows'] != 1)
{
$tMessage = $PALANG['pAdminCreate_domain_result_error'] . "<br />($fDomain)<br />";
-diff -aNru pfa/admin/edit-active-admin.php postfixAdmin/admin/edit-active-admin.php
+diff -aNru templates/edit-active-admin.php postfixAdmin/admin/edit-active-admin.php
--- pfa/admin/edit-active-admin.php 2006-02-08 19:00:47.674466250 +0100
+++ postfixAdmin/admin/edit-active-admin.php 2006-02-09 15:54:24.412385250 +0100
@@ -25,8 +25,8 @@
diff --git a/net-mail/postfixadmin/files/postinstall-en-mysql.txt b/net-mail/postfixadmin/files/postinstall-en-mysql.txt
new file mode 100644
index 0000000..651217b
--- /dev/null
+++ b/net-mail/postfixadmin/files/postinstall-en-mysql.txt
@@ -0,0 +1,18 @@
+To complete installation, you must:
+ 1. Create the needed MySQL database and tables and user:
+ mysql -u root -p < ${MY_SQLSCRIPTSDIR}/mysql/${PVR}_create.sql
+ 2. Reload MySQL:
+ /etc/init.d/mysql restart
+ 3. Set the password for the admin user!
+
+To use Virtual Vacation, please read VACATION_INSTALL.TXT in /usr/share/doc/${PF}
+
+Check the config.inc.php file. There you can specify settings that are
+relevant to your setup.
+
+Postfix Admin contains 3 views of administration:
+ 1. Site Admin view, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/admin/.
+ 2. Domain Admin view, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/.
+ 3. User Admin View, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/users/.
+
+In order to do the initial configuration you have to go to the Site Admin view.
diff --git a/net-mail/postfixadmin/files/postinstall-en-postgres.txt b/net-mail/postfixadmin/files/postinstall-en-postgres.txt
new file mode 100644
index 0000000..ae9b5a4
--- /dev/null
+++ b/net-mail/postfixadmin/files/postinstall-en-postgres.txt
@@ -0,0 +1,19 @@
+To complete installation, you must:
+ 1. Create the needed PostgreSQL database and tables and user:
+ creatuser -P postfix
+ creatuser -P postfixadmin
+ createdb -U postgres postfix
+ psql -U postgres -p < ${MY_SQLSCRIPTSDIR}/postgresql/${PVR}_create.sql
+ 2. Reload PostgreSQL:
+ /etc/init.d/postgresql restart
+ 3. Set the password for the admin user!!!
+
+Check the config.inc.php file. There you can specify settings that are
+relevant to your setup.
+
+Postfix Admin contains 3 views of administration:
+ 1. Site Admin view, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/admin/.
+ 2. Domain Admin view, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/.
+ 3. User Admin View, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/users/.
+
+In order to do the initial configuration you have to go to the Site Admin view.
diff --git a/net-mail/postfixadmin/files/postinstall-en.txt b/net-mail/postfixadmin/files/postinstall-en.txt
deleted file mode 100644
index c28ec30..0000000
--- a/net-mail/postfixadmin/files/postinstall-en.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-To complete installation, you must:
- 1. Create the needed MySQL database and tables and user:
- mysql -u root -p < ${MY_SQLSCRIPTSDIR}/mysql/${PVR}_create.sql
- 2. Reload MySQL:
- /etc/init.d/mysql restart
- 3. Change the password for the admin user! Inital password is
- "admin" (without the qotes).
-
-
-Updating from older version of Postfix Admin:
- * When you are upgrading from an older Postfix Admin version, make sure you
- * backup your database before you run the update script on your database.
- * mysqldump -a -u root -p > /tmp/postfixadmin-backup.sql
-
- For update from 2.0.x version of Postfix Admin:
- 1. Please read the BACKUP_MX.TXT
- 2. Update the needed MySQL database and tables:
- mysql -u root -p < ${MY_SQLSCRIPTSDIR}/mysql/2.0.x_to_${PVR}.sql
- 3. Reload MySQL:
- /etc/init.d/mysql restart
-
- For update from 1.5x (or older) version of Postfix Admin:
- 1. Please read the UPGRADE.TXT
- 2. Update the needed MySQL database and tables:
- mysql -u root -p < ${MY_SQLSCRIPTSDIR}/mysql/1.5x_to_${PVR}.sql
- 3. Reload MySQL:
- /etc/init.d/mysql restart
-
-
-To use Virtual Vacation, please read VIRTUAL_VACATION_INSTALL.
-
-Check the config.inc.php file. There you can specify settings that are
-relevant to your setup.
-
-Postfix Admin contains 3 views of administration:
- 1. Site Admin view, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/admin/.
- 2. Domain Admin view, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/.
- 3. User Admin View, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/users/.
-
-In order to do the initial configuration you have to go to the Site Admin view.
-
-The default password for the Site Admin view of Postfix Admin is admin/admin.
-
-This is specified in the .htpasswd file in the /admin directory. Make sure
-that the location of the .htpasswd file matches your path.
diff --git a/net-mail/postfixadmin/postfixadmin-2.1.0-r2.ebuild b/net-mail/postfixadmin/postfixadmin-2.1.0-r2.ebuild
deleted file mode 100644
index fb79f9f..0000000
--- a/net-mail/postfixadmin/postfixadmin-2.1.0-r2.ebuild
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-inherit eutils webapp depend.php depend.apache
-
-DESCRIPTION="Web Based Management tool for Postfix for dealing with Postfix Style Virtual Domains
-and Virtual Users that are stored in MySQL."
-HOMEPAGE="http://sourceforge.net/projects/postfixadmin/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
-
-LICENSE="MPL-1.1"
-KEYWORDS="~x86 ~amd64"
-IUSE="mysql postgres"
-
-RDEPEND=">=mail-mta/postfix-2.0.0
- mysql? ( dev-perl/DBI dev-perl/DBD-mysql )
- !www-apps/postfixadmin"
-
-need_php_httpd
-need_apache
-
-pkg_setup() {
- webapp_pkg_setup
- if use mysql; then
- enewgroup vacation
- enewuser vacation -1 -1 /dev/null vacation
- fi
-
- local flags="pcre session"
- use mysql && flags="${flags} mysql"
- use postgres && flags="${flags} postgres"
- require_php_with_use ${flags}
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # Remove .cvs* files and CVS directories
- ecvs_clean
-
- # Database support (we don't care wich one is used. Allow both of them!)
- if use mysql; then
- cp ./DATABASE_MYSQL.TXT "${T}"/mysql-setup.sql || die "Creating MySQL setup script failed!"
- cp ./TABLE_CHANGES.TXT "${T}"/mysql-update.sql || die "Creating MySQL update script failed!"
- cp ./VIRTUAL_VACATION/INSTALL.TXT "${T}"/VIRTUAL_VACATION_INSTALL.TXT
- fi
- if use postgres ; then
- cp ./DATABASE_PGSQL.TXT "${T}"/pgsql-setup.sql || die "Creating PostgreSQL setup script failed!"
- epatch "${FILESDIR}"/${P}-postgres-1.patch || die "Patching for postgres failed."
- epatch "${FILESDIR}"/${P}-postgres-2.patch || die "Patching for postgres failed."
- epatch "${FILESDIR}"/${P}-postgres-3.patch || die "Patching for postgres failed."
- fi
-
- # Rename config.inc.php
- cp ./config.inc.php.sample "${T}"/config.inc.php || die "Creating config file failed!"
-}
-
-src_install() {
- webapp_src_preinst
-
- # Virtual Vacation only works with MySQL
- if use mysql; then
- diropts -m0770 -o vacation -g vacation
- keepdir /var/spool/vacation
- insinto /var/spool/vacation
- insopts -m770 -o vacation -g vacation
- doins "${S}"/VIRTUAL_VACATION/vacation.pl
- fi
-
- # install the SQL scripts available to us
- # unfortunately, we do not have scripts to upgrade from older versions
- # these are things we need to add at a later date
- #
- if use mysql; then
- webapp_sqlscript mysql "${T}"/mysql-setup.sql
- webapp_sqlscript mysql "${T}"/mysql-update.sql 2.0.x
- webapp_sqlscript mysql "${T}"/mysql-update.sql 1.5x
- fi
- if use postgres ; then
- webapp_sqlscript postgres "${T}"/pgsql-setup.sql
- fi
-
-
- einfo "Installing main files"
- dodir ${MY_HTDOCSDIR}
- cp -r . "${D}"${MY_HTDOCSDIR} || die "cp failed"
- cp "${T}"/config.inc.php "${D}"${MY_HTDOCSDIR} || die "cp failed"
-
- # handle documentation files
- local docs="{BACKUP_MX,CHANGELOG,INSTALL,LANGUAGE,LICENSE.TXT,TABLE_BACKUP_MX,TABLE_CHANGES,UPGRADE}.TXT"
- use mysql && docs="${docs} DATABASE_MYSQL.TXT ${T}/VIRTUAL_VACATION_INSTALL.TXT"
- use postgres && docs="${docs} DATABASE_PGSQL.TXT"
-
- dodoc ${docs}
- for foo in ${docs} DATABASE_MYSQL.TXT DATABASE_PGSQL.TXT ADDITIONS VIRTUAL_VACATION ; do
- rm -rf "${D}"${MY_HTDOCSDIR}/${foo}
- done
-
- webapp_configfile ${MY_HTDOCSDIR}/config.inc.php
- webapp_configfile ${MY_HTDOCSDIR}/admin/.htpasswd
-
- # Add the hook file to fix the .htaccess file
- webapp_hook_script "${FILESDIR}"/config-hook.sh
-
- webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
-
- webapp_src_install
-}
diff --git a/net-mail/postfixadmin/postfixadmin-2.2.0_rc3.ebuild b/net-mail/postfixadmin/postfixadmin-2.2.0_rc3.ebuild
new file mode 100644
index 0000000..2635b70
--- /dev/null
+++ b/net-mail/postfixadmin/postfixadmin-2.2.0_rc3.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils webapp depend.php confutils
+
+DESCRIPTION="Web Based Management tool for Postfix for dealing with Postfix Style Virtual Domains
+and Virtual Users that are stored in MySQL/PostgreSQL."
+HOMEPAGE="http://sourceforge.net/projects/postfixadmin/"
+SRC_URI="mirror://sourceforge/${PN}/${P/_/-}.tar.gz"
+
+LICENSE="MPL-1.1"
+KEYWORDS="~x86 ~amd64"
+IUSE="extras mysql postgres vacation"
+
+RDEPEND=">=mail-mta/postfix-2.0.0
+ !www-apps/postfixadmin
+ vacation? ( dev-perl/DBI
+ dev-perl/Email-Valid
+ dev-perl/Mail-Sendmail
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )
+ )"
+
+need_php_httpd
+need_httpd_cgi
+
+S="${WORKDIR}/${P/_/-}"
+
+pkg_setup() {
+ webapp_pkg_setup
+
+ confutils_require_any mysql postgres
+ confutils_use_depend_built_with_all mysql mail-mta/postfix mysql
+ confutils_use_depend_built_with_all postgres mail-mta/postfix postgres
+
+ local flags="pcre session"
+ use postgres && flags="${flags} postgres"
+ if ! PHPCHECKNODIE="yes" require_php_with_use ${flags} || \
+ ( use mysql && ! PHPCHECKNODIE="yes" require_php_with_any_use mysql mysqli ) ; then
+ local diemsg="Re-install ${PHP_PKG} with ${flags}"
+ use mysql && diemsg="${diemsg} and at least one of ${dbflags}"
+ die "${diemsg} USE flags enabled."
+ fi
+
+ if use vacation ; then
+ enewgroup vacation
+ enewuser vacation -1 -1 /dev/null vacation
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # remove useless cruft
+ rm -rf debian/
+ rm -f something.tar.gz
+
+ use mysql && mv DATABASE_MYSQL.TXT "${T}"/mysql-setup.sql
+ if use postgres ; then
+ mv DATABASE_PGSQL.TXT "${T}"/pgsql-setup.sql
+ # TODO: these patches need checking/update
+ # epatch "${FILESDIR}"/${P}-postgres-1.patch || die "Patching for postgres failed."
+ # epatch "${FILESDIR}"/${P}-postgres-2.patch || die "Patching for postgres failed."
+ # epatch "${FILESDIR}"/${P}-postgres-3.patch || die "Patching for postgres failed."
+ fi
+}
+
+src_install() {
+ webapp_src_preinst
+
+ if use vacation ; then
+ diropts -m0770 -o vacation -g vacation
+ keepdir /var/spool/vacation
+ insinto /var/spool/vacation
+ insopts -m770 -o vacation -g vacation
+ doins "${S}"/VIRTUAL_VACATION/vacation.pl
+ fi
+
+
+ # handle documentation files
+ local docs="CHANGELOG.TXT INSTALL.TXT"
+ dodoc ${docs} DOCUMENTS/*.txt
+
+ if use vacation ; then
+ newdoc VIRTUAL_VACATION/INSTALL.TXT VACATION_INSTALL.TXT
+ newdoc VIRTUAL_VACATION/FILTER_README VACATION_FILTER_README
+ fi
+
+ if use extras ; then
+ docinto extras
+ dodoc ADDITIONS/*.{php,pl,sh,tgz} theme-support.patch
+ newdoc ADDITIONS/README.TXT README_EXTRAS.TXT
+ insinto /usr/share/doc/${PF}/screenshots
+ doins DOCUMENTS/screenshots/*.jpg
+ fi
+ rm -rf ${docs} GPL-LICENSE.TXT LICENSE.TXT theme-support.patch ADDITIONS/ DOCUMENTS/ VIRTUAL_VACATION/
+
+ insinto ${MY_HTDOCSDIR}
+ doins -r .
+
+ if use mysql; then
+ webapp_sqlscript mysql "${T}"/mysql-setup.sql
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en-mysql.txt
+ fi
+ if use postgres; then
+ webapp_sqlscript postgresql "${T}"/postgres-setup.sql
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en-postgres.txt
+ fi
+
+ webapp_configfile ${MY_HTDOCSDIR}/config.inc.php
+
+ webapp_src_install
+}