diff options
author | Gunnar Wrobel <wrobel@gentoo.org> | 2006-02-10 18:27:04 +0000 |
---|---|---|
committer | Gunnar Wrobel <wrobel@gentoo.org> | 2006-02-10 18:27:04 +0000 |
commit | f03e80f2dfda141deb5e1c567eee61289cfad07d (patch) | |
tree | 17c4bd5b381aa522f013c723ce4ea0251a80657b /www-apps/postfixadmin/postfixadmin-2.1.0-r1.ebuild | |
parent | Annotated two additional ebuilds (diff) | |
download | overlay-f03e80f2dfda141deb5e1c567eee61289cfad07d.tar.gz overlay-f03e80f2dfda141deb5e1c567eee61289cfad07d.tar.bz2 overlay-f03e80f2dfda141deb5e1c567eee61289cfad07d.zip |
Two info files, some postfixadmin fixes
svn path=/stable/; revision=665
Diffstat (limited to 'www-apps/postfixadmin/postfixadmin-2.1.0-r1.ebuild')
-rw-r--r-- | www-apps/postfixadmin/postfixadmin-2.1.0-r1.ebuild | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/www-apps/postfixadmin/postfixadmin-2.1.0-r1.ebuild b/www-apps/postfixadmin/postfixadmin-2.1.0-r1.ebuild new file mode 100644 index 0000000..b303a8f --- /dev/null +++ b/www-apps/postfixadmin/postfixadmin-2.1.0-r1.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 +} |