# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 inherit eutils DESCRIPTION="An administration utility for use with dbmail" HOMEPAGE="http://library.mobrien.com/dbmailadministrator/" SRC_URI="http://library.mobrien.com/dbmailadministrator/DBMA_SQL_V2.tar" DEPEND="=net-www/apache >=dev-perl/libnet-1.19 =dev-perl/DBI =dev-perl/Crypt-PasswdMD5 =dev-perl/CGI =dev-perl/Digest-MD5-2.33 =dev-perl/DBD-Pg =dev-perl/DBD-mysql" # also need to add in Crypt-PasswdMD RDEPEND="=net-mail/dbmail" SLOT="0" LICENSE="gpl-2" KEYWORDS="x86 amd64 ~ppc ~sparc" MY_S=${WORKDIR}/dbmailadministrator apache_user="apache" apache_group="apache" src_unpack() { unpack ${A} cd ${MY_S} [ -d ${MY_S}/ready_to_install_modules ] && rm -Rf ${MY_S}/ready_to_install_module # fix the .htaccess file for default use epatch ${FILESDIR}/dbmail-admin-htaccess.patch # fix to the DBMA.cgi file for the correct location of perl epatch ${FILESDIR}/dbmail-admin-perl.patch } src_install() { # we need to make sure that the .DB files are writeable from apache and that new DB files can be created cd ${WORKDIR} chown ${apache_user}:${apache_group} -R dbmailadministrator chmod -R 770 dbmailadministrator # Copy the files to the correct place install -d ${D}/var/www/localhost/htdocs cp -Rfa ${MY_S} ${D}/var/www/localhost/htdocs/ } pkg_postinst() { einfo ">>> in order to use dbmail administrator after the emerge" einfo ">>> First restart the apache web server if it's already running" einfo ">>> by executing the command:" einfo ">>> /etc/init.d/apache restart" einfo ">>> Next dbmail-admin can be accessed on the local machine from the following web link" einfo ">>> http://localhost/dbmailadministrator/" einfo ">>> the default user name / password is dbmail:dbmail" einfo ">>> to alter this, use the htpasswd command to alter the .htpasswd file located here:" einfo ">>> /var/www/localhost/htdocs/dbmailadministrator/.htpasswd" }