net-mail/dovecot: security bump to 2.3.10.1
[gentoo.git] / net-mail / qmail-autoresponder / qmail-autoresponder-0.97-r3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Rate-limited autoresponder for qmail"
9 HOMEPAGE="http://untroubled.org/qmail-autoresponder/"
10 SRC_URI="http://untroubled.org/qmail-autoresponder/archive/${P}.tar.gz"
11
12 SLOT="0"
13 LICENSE="GPL-2"
14 KEYWORDS="~alpha amd64 ~hppa ~mips ppc ~sparc x86"
15 IUSE="mysql"
16
17 DEPEND=">=dev-libs/bglibs-1.106
18         mysql? ( dev-db/mysql-connector-c:0= )"
19 RDEPEND="
20         ${DEPEND}
21         virtual/qmail
22         mysql? ( virtual/mysql )
23 "
24
25 src_prepare() {
26         use mysql || eapply "${FILESDIR}/${PN}-0.97-remove-mysql.h.diff"
27         default
28 }
29
30 src_configure() {
31         echo "/usr/include/bglibs" > conf-bgincs || die
32         echo "/usr/$(get_libdir)/bglibs" > conf-bglibs || die
33         echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die
34         echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die
35 }
36
37 src_compile() {
38         # fails on parallel builds!
39         make qmail-autoresponder || die "Failed to make qmail-autoresponder"
40         if use mysql; then
41                 make qmail-autoresponder-mysql || die "Failed to make qmail-autoresponder-mysql"
42         fi
43 }
44
45 src_install() {
46         dobin qmail-autoresponder
47         doman qmail-autoresponder.1
48         if use mysql; then
49                 dobin qmail-autoresponder-mysql
50                 dodoc schema.mysql
51         fi
52
53         dodoc ANNOUNCEMENT NEWS README TODO ChangeLog procedure.txt
54 }
55
56 pkg_postinst() {
57         elog "Please see the README file in /usr/share/doc/${PF}/ for per-user configurations."
58 }