From c457d88083ea9ec0c7766380c79a2d9a14d26327 Mon Sep 17 00:00:00 2001 From: Jakub Moc Date: Sat, 1 Jul 2006 21:38:55 +0000 Subject: net-mail/dbmail - redo configure logic, default to MySQL unless USE=postgres is set. $P -> $PF, other fixes. svn path=/sunrise/; revision=409 --- net-mail/dbmail/Manifest | 8 +++--- net-mail/dbmail/dbmail-2.0.10.ebuild | 48 ++++++++++++++++-------------------- 2 files changed, 25 insertions(+), 31 deletions(-) (limited to 'net-mail/dbmail') diff --git a/net-mail/dbmail/Manifest b/net-mail/dbmail/Manifest index f6c5edbf7..a12352611 100644 --- a/net-mail/dbmail/Manifest +++ b/net-mail/dbmail/Manifest @@ -11,10 +11,10 @@ MD5 dbbd231ee5484a4765219a6db07ce322 files/dbmail-pop3d.initd 716 RMD160 cf46a724049b8bac9a11ea02b89affdc0fb1652b files/dbmail-pop3d.initd 716 SHA256 69ea1a4e5ce9d645e5be2d1732aa1dfcb2026fd536797a746be4034c4f89e48d files/dbmail-pop3d.initd 716 DIST dbmail-2.0.10.tar.gz 632451 RMD160 3a9736e1e938b629a22cf52bbf5dba7b2b785dda SHA1 e9c2f856631e977d3bd3123dc1b5247454564966 SHA256 249a57d7c163155c7bf2ca758fa1fabc676aa84d3a0d8403e497a8da7ff49716 -EBUILD dbmail-2.0.10.ebuild 2557 RMD160 3d79720c87f28c29ee379ffab24982ecce6b1c59 SHA1 2e8021028628f7c830f755b30cce23c2cbd5ca44 SHA256 c4aa6dc28b7638a53c3bb74e587ec8bc4443fb4cf469a6cb4fcb16d0935a36e3 -MD5 e2458664f738d17a9181cbb8f200db05 dbmail-2.0.10.ebuild 2557 -RMD160 3d79720c87f28c29ee379ffab24982ecce6b1c59 dbmail-2.0.10.ebuild 2557 -SHA256 c4aa6dc28b7638a53c3bb74e587ec8bc4443fb4cf469a6cb4fcb16d0935a36e3 dbmail-2.0.10.ebuild 2557 +EBUILD dbmail-2.0.10.ebuild 2508 RMD160 1b24419009ea2e904cd8b9be8a98665e00372b20 SHA1 9f0b4d646e13e298bfb0626f5348f1485ce42aec SHA256 bfb951da7e7325b1451cbb58d57c7a39fa9d78a4f8d563817c97a38d2ab2f3e3 +MD5 bc82477473e8dbaeccab0c24b817e2b3 dbmail-2.0.10.ebuild 2508 +RMD160 1b24419009ea2e904cd8b9be8a98665e00372b20 dbmail-2.0.10.ebuild 2508 +SHA256 bfb951da7e7325b1451cbb58d57c7a39fa9d78a4f8d563817c97a38d2ab2f3e3 dbmail-2.0.10.ebuild 2508 MISC ChangeLog 280 RMD160 10c6a9632d3a7d0f9d3bba50ed075d260134c884 SHA1 556a1e84b67bc00348ddc5f4ba7af0df7e1b310a SHA256 3d0bb47627153a9e2e6bd3fda186455e78bc554f0886b69f86f62c811ca34ea8 MD5 b47e2634973f84d129ef780835dbe776 ChangeLog 280 RMD160 10c6a9632d3a7d0f9d3bba50ed075d260134c884 ChangeLog 280 diff --git a/net-mail/dbmail/dbmail-2.0.10.ebuild b/net-mail/dbmail/dbmail-2.0.10.ebuild index 918a6e9f5..133a8f60f 100644 --- a/net-mail/dbmail/dbmail-2.0.10.ebuild +++ b/net-mail/dbmail/dbmail-2.0.10.ebuild @@ -11,27 +11,21 @@ SRC_URI="http://www.dbmail.org/download/2.0/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" -IUSE="ssl postgres mysql" +IUSE="ssl postgres" -DEPEND=" - ssl? ( dev-libs/openssl ) - mysql? ( >=dev-db/mysql-4.0.12 ) +DEPEND="ssl? ( dev-libs/openssl ) postgres? ( dev-db/postgresql ) - sys-libs/zlib -" + !postgres? ( >=dev-db/mysql-4.0.12 ) + sys-libs/zlib" pkg_setup() { - if use mysql && use postgres ; then - eerror "Unfortunatly you can't have both MySQL and PostgreSQL" - eerror " enabled at the same time." - eerror "You have to remove either 'mysql' or 'postgres'" - eerror "from your USE flags before emerging dbmail." - exit 1 - fi - - if ! use mysql && ! use postgres ; then - eerror "Unfortunatly you have to enable either MySQL or PostgreSQL" - exit 1 + if use postgres && has_version dev-db/mysql ; then + einfo "You have postgres use flag set, ${PN} will compile against PostgreSQL." + einfo "If you want to use MySQL instead, unset postgres use flag for this ebuild:" + einfo + einfo "echo \"net-mail/dbmail -postgres\" >> /etc/portage/package.use" + einfo + epause 3 fi enewgroup dbmail @@ -41,18 +35,18 @@ pkg_setup() { src_compile() { econf \ $(use_with ssl) \ - $(use_with mysql) \ - $(use_with postgres) || die "econf failed" + $(use_with postgres) \ + $(use_with !postgres mysql) || die "econf failed" # --sysconfdir is not taken into consideration thus we use sed here sed -i -e "s:\(.*etc/\)\(.*$\):\1dbmail/\2:" dbmail.h emake || die "emake failed" } src_install() { - emake DESTDIR=${D} install || die "emake install failed" + emake DESTDIR="${D}" install || die "emake install failed" dodoc AUTHORS BUGS EXTRAS ChangeLog UPGRADING \ - INSTALL* VERSION NEWS README THANKS TODO + INSTALL* VERSION NEWS README THANKS TODO dodoc sql/mysql/* dodoc sql/postgresql/* @@ -61,9 +55,9 @@ src_install() { insinto /etc/dbmail newins dbmail.conf dbmail.conf.dist - newinitd ${FILESDIR}/dbmail-imapd.initd dbmail-imapd - newinitd ${FILESDIR}/dbmail-lmtpd.initd dbmail-lmtpd - newinitd ${FILESDIR}/dbmail-pop3d.initd dbmail-pop3d + newinitd "${FILESDIR}"/dbmail-imapd.initd dbmail-imapd + newinitd "${FILESDIR}"/dbmail-lmtpd.initd dbmail-lmtpd + newinitd "${FILESDIR}"/dbmail-pop3d.initd dbmail-pop3d dobin contrib/mailbox2dbmail/mailbox2dbmail doman contrib/mailbox2dbmail/mailbox2dbmail.1 @@ -74,15 +68,15 @@ src_install() { } pkg_postinst() { - einfo "Please read /usr/share/doc/${P}/INSTALL.gz" + einfo "Please read /usr/share/doc/${PF}/INSTALL.gz" einfo "for remaining instructions on setting up dbmail users and " einfo "for finishing configuration to connect to your MTA and " einfo "to connect to your db." - einfo "Database schemes can be found in /usr/share/doc/${P}/" + einfo + einfo "Database schemes can be found in /usr/share/doc/${PF}/" einfo "You will also want to follow the installation instructions" einfo "on setting up the maintenance program to delete old messages." einfo "Don't forget to edit /etc/dbmail/dbmail.conf as well. :)" einfo ">>> --- For maintenance ---" einfo ">>> add this to crontab: 0 3 * * * /usr/bin/dbmail-util -cpdy >/dev/null 2>&1 " } - -- cgit v1.2.3-65-gdbad