summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@gentoo.org>2006-02-09 21:19:49 +0000
committerGunnar Wrobel <wrobel@gentoo.org>2006-02-09 21:19:49 +0000
commit340a32904f18b438dccfd141b33b96712c1e09ef (patch)
tree4fbef0b1c621ca1191a4d20832f328c50b08c7fe /www-apps
parentUpdated polymeraze (diff)
downloadoverlay-340a32904f18b438dccfd141b33b96712c1e09ef.tar.gz
overlay-340a32904f18b438dccfd141b33b96712c1e09ef.tar.bz2
overlay-340a32904f18b438dccfd141b33b96712c1e09ef.zip
Temporarily adding postfixadmin for postgres fixes
svn path=/stable/; revision=661
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/postfixadmin/ChangeLog20
-rw-r--r--www-apps/postfixadmin/Manifest6
-rw-r--r--www-apps/postfixadmin/files/config-hook.sh10
-rw-r--r--www-apps/postfixadmin/files/digest-postfixadmin-2.1.01
-rw-r--r--www-apps/postfixadmin/files/postinstall-en.txt45
-rw-r--r--www-apps/postfixadmin/metadata.xml10
-rw-r--r--www-apps/postfixadmin/postfixadmin-2.1.0.ebuild161
7 files changed, 253 insertions, 0 deletions
diff --git a/www-apps/postfixadmin/ChangeLog b/www-apps/postfixadmin/ChangeLog
new file mode 100644
index 0000000..7092d55
--- /dev/null
+++ b/www-apps/postfixadmin/ChangeLog
@@ -0,0 +1,20 @@
+# ChangeLog for www-apps/postfixadmin
+# Copyright 1999-2006 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 $
+
+*postfixadmin-2.1.0 (02 Feb 2006)
+
+ 02 Feb 2006; <wrobel@gentoo.org> +files/config-hook.sh,
+ +files/postinstall-en.txt, +metadata.xml, +postfixadmin-2.1.0.ebuild:
+ Fixed the use of enewuser. Moved ebuild to portage
+
+ 03 Jan 2006; <wrobel@gentoo.org> ChangeLog:
+ Repoman fixes.
+
+ 28 Dec 2005; Gunnar Wrobel <php@gunnarwrobel.de> ChangeLog:
+ Minor cleanup for postfixadmin. Seems to work with php5.
+
+ 14 Dec 2005; <php@gunnarwrobel.de> ChangeLog:
+ Initial ebuild import into the overlay. Original ebuild from SteveB
+ <tp22a@softhome.net>. See bug #50035
+
diff --git a/www-apps/postfixadmin/Manifest b/www-apps/postfixadmin/Manifest
new file mode 100644
index 0000000..651594f
--- /dev/null
+++ b/www-apps/postfixadmin/Manifest
@@ -0,0 +1,6 @@
+MD5 67d698e97f83e6ac673cdb9abd9f39bf ChangeLog 778
+MD5 17d031307a6d7279883bd84e00c7ab36 files/config-hook.sh 202
+MD5 7892309c6746f5bbc334992cc0f90a97 files/digest-postfixadmin-2.1.0 67
+MD5 0d999fdb7bfafcc1fb395b07b38ca939 files/postinstall-en.txt 1859
+MD5 2475b9abb75a74d9fa92ea07cfaf7d41 metadata.xml 300
+MD5 a0b406aafe2e4a659b31678804f5b3e0 postfixadmin-2.1.0.ebuild 4003
diff --git a/www-apps/postfixadmin/files/config-hook.sh b/www-apps/postfixadmin/files/config-hook.sh
new file mode 100644
index 0000000..bc22227
--- /dev/null
+++ b/www-apps/postfixadmin/files/config-hook.sh
@@ -0,0 +1,10 @@
+#!/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/www-apps/postfixadmin/files/digest-postfixadmin-2.1.0 b/www-apps/postfixadmin/files/digest-postfixadmin-2.1.0
new file mode 100644
index 0000000..f15183b
--- /dev/null
+++ b/www-apps/postfixadmin/files/digest-postfixadmin-2.1.0
@@ -0,0 +1 @@
+MD5 89043e52796298f44a06d65eaddaef09 postfixadmin-2.1.0.tgz 160525
diff --git a/www-apps/postfixadmin/files/postinstall-en.txt b/www-apps/postfixadmin/files/postinstall-en.txt
new file mode 100644
index 0000000..c28ec30
--- /dev/null
+++ b/www-apps/postfixadmin/files/postinstall-en.txt
@@ -0,0 +1,45 @@
+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/www-apps/postfixadmin/metadata.xml b/www-apps/postfixadmin/metadata.xml
new file mode 100644
index 0000000..2dde2f7
--- /dev/null
+++ b/www-apps/postfixadmin/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>web-apps</herd>
+<maintainer>
+ <email>wrobel@gentoo.org</email>
+ <name>Gunnar Wrobel</name>
+ <description>Primary maintainer</description>
+</maintainer>
+</pkgmetadata>
diff --git a/www-apps/postfixadmin/postfixadmin-2.1.0.ebuild b/www-apps/postfixadmin/postfixadmin-2.1.0.ebuild
new file mode 100644
index 0000000..b303a8f
--- /dev/null
+++ b/www-apps/postfixadmin/postfixadmin-2.1.0.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/postfixadmin/postfixadmin-2.1.0.ebuild,v 1.1 2006/02/02 19:35:13 wrobel Exp $
+
+# Source: http://bugs.gentoo.org/show_bug.cgi?id=50035
+# Submitted-By: SteveB <tp22a@softhome.net>
+# Reviewed-By: wrobel 2005-12-14
+# $Id: postfixadmin-2.1.0.ebuild,v 1.1 2006/02/02 19:35:13 wrobel Exp $
+
+inherit eutils webapp
+
+IUSE="mysql postgres vhosts"
+DESCRIPTION="Postfix Admin is a Web Based Management tool for Postfix when you are dealing with Postfix Style Virtual Domains and Virtual Users that are stored in MySQL."
+HOMEPAGE="http://high5.net/postfixadmin/"
+SRC_URI="http://high5.net/${PN}/${PN}-${PV}.tgz"
+RESTRICT="nomirror"
+KEYWORDS="~x86"
+
+DEPEND="virtual/httpd-php
+ >=mail-mta/postfix-2.0.0
+ >=net-www/apache-1.3.27
+ mysql? ( >=dev-db/mysql-3.23
+ >=dev-lang/perl-5.0
+ dev-perl/DBI
+ dev-perl/DBD-mysql )
+ postgres? ( >=dev-db/postgresql-7.4.3 )"
+
+RDEPEND=">=sys-apps/sed-4.0.5
+ sys-apps/grep
+ sys-apps/findutils"
+
+LICENSE="MPL-1.1"
+
+pkg_setup() {
+ webapp_pkg_setup
+ if use mysql; then
+ id vacation 2>/dev/null || enewgroup vacation
+ id vacation 2>/dev/null || enewuser vacation -1 -1 /dev/null vacation
+ if ! built_with_use virtual/httpd-php mysql ; then
+ eerror "PHP is missing MySQL support."
+ eerror "Please add 'mysql' to your USE flags, and re-emerge PHP."
+ die "PHP needs MySQL support"
+ fi
+ fi
+ if use postgres; then
+ if ! built_with_use virtual/httpd-php postgres ; then
+ eerror "PHP is missing Postgres support."
+ eerror "Please add 'postgres' to your USE flags, and re-emerge PHP."
+ die "PHP needs Postgres support"
+ fi
+ fi
+ if ! built_with_use virtual/httpd-php pcre ; then
+ eerror "PHP is missing regular expression support."
+ eerror "Please add 'pcre' to your USE flags, and re-emerge PHP."
+ die "PHP needs regular expression support"
+ fi
+ if ! built_with_use virtual/httpd-php session ; then
+ eerror "PHP is missing session support."
+ eerror "Please add 'session' to your USE flags, and re-emerge PHP."
+ die "PHP needs regular expression support"
+ fi
+}
+
+src_unpack() {
+ unpack ${A} || die
+ cd ${S}
+
+ # Remove .cvs* files and CVS directories
+ find ${S} -name .cvs\* -or \( -type d -name CVS -prune \) -exec rm -rf {} \;
+
+ # 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!"
+ 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
+ dodir /var/spool/vacation
+ keepdir /var/spool/vacation
+ insinto /var/spool/vacation
+ insopts -m770 -o vacation -g vacation
+ doins ${S}/VIRTUAL_VACATION/vacation.pl
+ fi
+
+ # Documentation
+ #
+ local docs="BACKUP_MX.TXT CHANGELOG.TXT INSTALL.TXT LANGUAGE.TXT LICENSE.TXT TABLE_BACKUP_MX.TXT TABLE_CHANGES.TXT UPGRADE.TXT"
+ if use mysql; then
+ docs="${docs} DATABASE_MYSQL.TXT ${T}/VIRTUAL_VACATION_INSTALL.TXT"
+ fi
+ if use postgres ; then
+ docs="${docs} DATABASE_PGSQL.TXT"
+ 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 pgsql ${T}/pgsql-setup.sql
+ fi
+
+
+ # Copy the app's main files
+ #
+ einfo "Installing main files"
+ mkdir -p ${D}${MY_HTDOCSDIR}
+ cp -r . ${D}${MY_HTDOCSDIR} || die "cp failed"
+ cp ${T}/config.inc.php ${D}${MY_HTDOCSDIR} || die "cp failed"
+
+ # handle documentation files
+ #
+ # NOTE that doc files go into /usr/share/doc as normal; they do NOT
+ # get installed per vhost!
+ #
+ dodoc ${docs}
+ for foo in ${docs} DATABASE_MYSQL.TXT DATABASE_PGSQL.TXT ADDITIONS VIRTUAL_VACATION
+ do
+ rm -f ${D}${MY_HTDOCSDIR}/${foo}
+ done
+
+ # Identify the configuration files that this app uses
+ #
+ 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
+
+ # Add the post-installation instructions
+ #
+ webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
+
+ # All done
+ #
+ # Now we let the eclass strut its stuff ;-)
+ #
+ webapp_src_install
+}