This commit is contained in:
Sandino Araico Sanchez 2015-04-03 22:30:10 -06:00
parent c016ffe5a9
commit d201dc812a
22 changed files with 0 additions and 193 deletions

View file

@ -1,146 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-mail/dbmail/dbmail-3.2.2.ebuild,v 1.4 2015/03/22 12:53:43 pacho Exp $
EAPI="4"
inherit eutils multilib versionator user
DESCRIPTION="DBMail is an open-source project that enables storage of mail messages in a relational database"
HOMEPAGE="http://www.dbmail.org/"
SRC_URI="http://www.dbmail.org/download/$(get_version_component_range 1-2)/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="ldap sieve +sqlite ssl static"
DEPEND="dev-db/libzdb
sieve? ( >=mail-filter/libsieve-2.2.1 )
ldap? ( >=net-nds/openldap-2.3.33 )
app-text/asciidoc
app-text/xmlto
app-crypt/mhash
sys-libs/zlib
dev-libs/gmime:2.6
>=dev-libs/glib-2.16
dev-libs/libevent
ssl? ( dev-libs/openssl )"
#asciidoc and xmlto needed?
RDEPEND="${DEPEND}"
pkg_setup() {
enewgroup dbmail
enewuser dbmail -1 -1 /var/lib/dbmail dbmail
}
src_prepare() {
epatch "${FILESDIR}/3.2-pgsql-RETURNING.patch"
epatch "${FILESDIR}/3.2-query-time.patch"
}
src_configure() {
local myconf=""
use ldap && myconf=${myconf}" --with-auth-ldap"
econf \
--sysconfdir=/etc/dbmail \
$(use_enable static) \
$(use_with sieve) \
${myconf}
}
src_compile() {
emake || die "emake failed"
}
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
dodoc AUTHORS BUGS ChangeLog README* INSTALL NEWS THANKS UPGRADING
docompress -x /usr/share/doc/${PF}/sql
dodoc -r sql
dodoc -r test-scripts
dodoc -r contrib
## TODO: install other contrib stuff
sed -i -e "s:nobody:dbmail:" dbmail.conf
sed -i -e "s:nogroup:dbmail:" dbmail.conf
sed -i -e "s:/var/run:/var/run/dbmail:" dbmail.conf
#sed -i -e "s:#library_directory:library_directory:" dbmail.conf
insinto /etc/dbmail
newins dbmail.conf dbmail.conf.dist
# change config path to our default and use the conf.d and init.d files from the contrib dir
sed -i -e "s:/etc/dbmail.conf:/etc/dbmail/dbmail.conf:" contrib/startup-scripts/gentoo/init.d-dbmail
#sed -i -e "s:exit 0:return 1:" contrib/startup-scripts/gentoo/init.d-dbmail
#sed -i -e "s:/var/run:/var/run/dbmail:" contrib/startup-scripts/gentoo/init.d-dbmail
#newconfd contrib/startup-scripts/gentoo/conf.d-dbmail dbmail
#newinitd contrib/startup-scripts/gentoo/init.d-dbmail dbmail
# use custom init scripts until updated in upstream contrib
newinitd "${FILESDIR}/dbmail-imapd.initd" dbmail-imapd
newinitd "${FILESDIR}/dbmail-lmtpd.initd" dbmail-lmtpd
newinitd "${FILESDIR}/dbmail-pop3d.initd" dbmail-pop3d
newinitd "${FILESDIR}/dbmail-timsieved.initd" dbmail-timsieved
dobin contrib/mailbox2dbmail/mailbox2dbmail
doman contrib/mailbox2dbmail/mailbox2dbmail.1
#doman man/*.{1,5,8}
# ldap schema
if use ldap; then
insinto /etc/openldap/schema
doins "${S}/dbmail.schema"
fi
keepdir /var/lib/dbmail
fperms 750 /var/lib/dbmail
fowners dbmail:dbmail /var/lib/dbmail
# create this through init-scripts instead of at installt ime (bug #455002)
#keepdir /var/run/dbmail
#fowners dbmail:dbmail /var/run/dbmail
}
pkg_postinst() {
elog "Please read the INSTALL file in /usr/share/doc/${PF}/"
elog "for remaining instructions on setting up dbmail users and "
elog "for finishing configuration to connect to your MTA and "
elog "to connect to your db."
echo
elog "DBMail requires either SQLite, PostgreSQL or MySQL."
elog "Database schemes can be found in /usr/share/doc/${PF}/"
elog "You will also want to follow the installation instructions"
elog "on setting up the maintenance program to delete old messages."
elog "Don't forget to edit /etc/dbmail/dbmail.conf as well."
echo
elog "For regular maintenance, add this to crontab:"
elog "0 3 * * * /usr/bin/dbmail-util -cpdy >/dev/null 2>&1"
echo
elog "Please make sure to run etc-update."
elog "If you get an error message about plugins not found"
elog "please add the library_directory configuration switch to"
elog "dbmail.conf and set it to the correct path"
elog "(usually /usr/lib/dbmail or /usr/lib64/dbmail on amd64)"
elog "A sample can be found in dbmail.conf.dist after etc-update."
echo
elog "We are now using the init script from upstream."
elog "Please edit /etc/conf.d/dbmail to set which services to start"
elog "and delete /etc/init.d/dbmail-* when you are done. (don't"
elog "forget to rc-update del dbmail-* first)"
echo
elog "Changed pid directory to /var/run/dbmail (see"
elog "http://www.dbmail.org/mantis/view.php?id=949 for details)"
echo
ewarn "The database config has changed to support libzdb db URI"
ewarn "Please check the documentation (or Bug #479664)"
echo
ewarn "The database schema has changed since 3.0.x make sure"
ewarn "to run the migration script"
echo
ewarn "Please be aware, that the single init-script for all services"
ewarn "has been replaced with seperate init scripts for the individual services."
ewarn "Make sure to add dbmail-(imapd|lmtpd|pop3d|timsieved) using rc-update"
ewarn "and remove dbmail if you want to take advantage of this change."
echo
}

View file

@ -1,13 +0,0 @@
diff -uriN dbmail-3.2.2.orig/src/dm_db.c dbmail-3.2.2/src/dm_db.c
--- dbmail-3.2.2.orig/src/dm_db.c 2014-12-20 16:32:38.000000000 -0600
+++ dbmail-3.2.2/src/dm_db.c 2015-04-03 19:20:28.000000000 -0600
@@ -354,7 +354,7 @@
void log_query_time(char *query, struct timeval before, struct timeval after)
{
- double elapsed = ((double)after.tv_sec + ((double)after.tv_usec / 1000000)) - ((double)before.tv_sec + ((double)before.tv_usec / 1000000));
+ double elapsed = (((double)after.tv_sec * 1000000 + (double)after.tv_usec) / 1000000) - (((double)before.tv_sec * 1000000 + (double)before.tv_usec) / 1000000);
TRACE(TRACE_DATABASE, "last query took [%.3f] seconds", elapsed);
if (elapsed > (double)db_params.query_time_warning)
TRACE(TRACE_WARNING, "slow query [%s] took [%.3f] seconds", query, elapsed);

View file

@ -1 +0,0 @@
MD5 a0b96ed7fe871d20f38345178ed50b96 dbmail-1.2.10.tgz 247890

View file

@ -1,3 +0,0 @@
MD5 5d1a3486246db78603b15245490d9386 dbmail-1.2.11.tgz 248256
RMD160 605864ca651f89f9a5a2d85635569db68d3cf1db dbmail-1.2.11.tgz 248256
SHA256 4fcdf66fb8f6ab97fad014a5c54284f6ae815ae48708692c29c5dd5edc45c17b dbmail-1.2.11.tgz 248256

View file

@ -1 +0,0 @@
MD5 78d2aea0584503d859e4af202ec7257c dbmail-1.2.3.tgz 249774

View file

@ -1 +0,0 @@
MD5 1a7158aa032c4d6950984d0f99ee7ebe dbmail-1.2.4.tgz 245852

View file

@ -1 +0,0 @@
MD5 337577142bb01b4bf28ec7a9808f5492 dbmail-1.2.5.tgz 245878

View file

@ -1 +0,0 @@
MD5 f40b5203f1725303f2c5013ad5588854 dbmail-1.2.6.tgz 245961

View file

@ -1 +0,0 @@
MD5 dbd6ba5cf991301dd2aa9d184e0a3667 dbmail-1.2.7.tgz 245263

View file

@ -1 +0,0 @@
MD5 c15cc6b8e34527a31fb3d2e45e977b16 dbmail-1.2.7a.tgz 244788

View file

@ -1 +0,0 @@
MD5 6400cc05d661694a16d8d5a2df9ab580 dbmail-1.2.7b.tgz 244831

View file

@ -1 +0,0 @@
MD5 1e587c3b928a5af20d8d7968785bda92 dbmail-1.2.8a.tgz 245644

View file

@ -1 +0,0 @@
MD5 f97492c74e64ecabff77eb87f34a2ea5 dbmail-1.2.9.tgz 247577

View file

@ -1,3 +0,0 @@
MD5 fc80ac11a24286aa78ee71dd78c965a1 dbmail-2.0.4.tgz 589603
RMD160 fdf3d9489ff14f910b138c4af4bfcfd66366c58a dbmail-2.0.4.tgz 589603
SHA256 a212a122bc7184ebc80393ded289abfbfe068beec7e7f02487f8b140d86a9daa dbmail-2.0.4.tgz 589603

View file

@ -1,3 +0,0 @@
MD5 ae2717988a3646ced64278004b3d1890 dbmail-2.0.5.tar.gz 583899
RMD160 49b0d34b18b26d837eb3ab17fa4053d2ed438fd4 dbmail-2.0.5.tar.gz 583899
SHA256 787186abcfec648d34505a30783607659b67c5ffb88b2a8e026a4577fb83538c dbmail-2.0.5.tar.gz 583899

View file

@ -1,3 +0,0 @@
MD5 6cff2fb881f6738d2197bafd90601c76 dbmail-2.0.6.tar.gz 582932
RMD160 c4d4e26eec9934dd638816833830591db9f4a3b4 dbmail-2.0.6.tar.gz 582932
SHA256 cd1de68b603db90fb6e4c404832b01054e6c8e66e28d5e3fa7077ace113eb7bb dbmail-2.0.6.tar.gz 582932

View file

@ -1,3 +0,0 @@
MD5 6cff2fb881f6738d2197bafd90601c76 dbmail-2.0.6.tar.gz 582932
RMD160 c4d4e26eec9934dd638816833830591db9f4a3b4 dbmail-2.0.6.tar.gz 582932
SHA256 cd1de68b603db90fb6e4c404832b01054e6c8e66e28d5e3fa7077ace113eb7bb dbmail-2.0.6.tar.gz 582932

View file

@ -1,3 +0,0 @@
MD5 6cff2fb881f6738d2197bafd90601c76 dbmail-2.0.6.tar.gz 582932
RMD160 c4d4e26eec9934dd638816833830591db9f4a3b4 dbmail-2.0.6.tar.gz 582932
SHA256 cd1de68b603db90fb6e4c404832b01054e6c8e66e28d5e3fa7077ace113eb7bb dbmail-2.0.6.tar.gz 582932

View file

@ -1,3 +0,0 @@
MD5 11e6eded9e5ec533f6e6ed11fc62a4d8 dbmail-2.0.7.tar.gz 584457
RMD160 f23d83c5adeb47f84d366ea147a4ce7f654f0508 dbmail-2.0.7.tar.gz 584457
SHA256 ef678002a0f6eed3ae8babc17760e36a76e678852c50d70d8dee1fe693f54026 dbmail-2.0.7.tar.gz 584457

View file

@ -1 +0,0 @@
MD5 3af61cec11e1ccd7d4a9fba84e085894 dbmail-2.0.8.tar.gz 627144

View file

@ -1 +0,0 @@
MD5 f3cca8eb615af565a388069c1ab68f08 dbmail-2.0rc5.tgz 273950

View file

@ -1 +0,0 @@
MD5 c4de1dcd3bda486ba764a5d12765820b dbmail-2.0rc8.tgz 417518