gentoo-overlay/net-mail/dbmail/dbmail-3.2.5.ebuild

97 lines
2.4 KiB
Bash
Raw Normal View History

2020-08-04 00:40:32 -05:00
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
2021-01-10 03:34:11 -06:00
inherit systemd readme.gentoo-r1
2020-08-04 00:40:32 -05:00
DESCRIPTION="Fast and scalable sql based email services"
2021-01-10 03:34:11 -06:00
HOMEPAGE="https://www.dbmail.org/"
2020-08-04 00:40:32 -05:00
SRC_URI="https://github.com/dbmail/dbmail/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+doc jemalloc ldap libressl sieve ssl static systemd"
DEPEND="dev-db/libzdb
sieve? ( >=mail-filter/libsieve-2.2.1 )
ldap? ( >=net-nds/openldap-2.3.33 )
jemalloc? ( dev-libs/jemalloc )
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? (
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
)"
RDEPEND="${DEPEND}
acct-group/dbmail
acct-user/dbmail"
DOCS=( AUTHORS README.md INSTALL THANKS UPGRADING )
2020-08-04 00:40:32 -05:00
2021-01-10 03:34:11 -06:00
README_GENTOO_SUFFIX=""
src_prepare() {
sed -i -e "s:nobody:dbmail: ; s:nogroup:dbmail: ; s:/var/run:/run/dbmail:" dbmail.conf || die
# 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 || die
default
}
2020-08-04 00:40:32 -05:00
src_configure() {
econf \
--enable-manpages \
--sysconfdir=/etc/dbmail \
$(use_enable doc manpages) \
$(use_enable static) \
$(use_enable systemd) \
$(use_with jemalloc) \
$(use_with sieve) \
$(use_with ldap auth-ldap)
}
src_install() {
emake DESTDIR="${D}" SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install
einstalldocs
docompress -x /usr/share/doc/${PF}/sql
dodoc -r sql
dodoc -r test-scripts
dodoc -r contrib
## TODO: install other contrib stuff
insinto /etc/dbmail
newins dbmail.conf dbmail.conf.dist
# 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
# 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
2021-01-11 05:16:12 -06:00
readme.gentoo_create_doc
2020-08-04 00:40:32 -05:00
}
pkg_postinst() {
2021-01-10 03:34:11 -06:00
readme.gentoo_print_elog
2020-08-04 00:40:32 -05:00
}