Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/gld/
Date: Sun, 11 Oct 2015 00:00:45
Message-Id: 1444521975.e169d49167801b7acced3f1264fb086a41947b3d.blueness@gentoo
1 commit: e169d49167801b7acced3f1264fb086a41947b3d
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 11 00:06:15 2015 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 11 00:06:15 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e169d491
7
8 mail-filter/gld: add libressl support
9
10 Package-Manager: portage-2.2.20.1
11
12 mail-filter/gld/gld-1.7-r3.ebuild | 78 +++++++++++++++++++++++++++++++++++++++
13 1 file changed, 78 insertions(+)
14
15 diff --git a/mail-filter/gld/gld-1.7-r3.ebuild b/mail-filter/gld/gld-1.7-r3.ebuild
16 new file mode 100644
17 index 0000000..cdcff43
18 --- /dev/null
19 +++ b/mail-filter/gld/gld-1.7-r3.ebuild
20 @@ -0,0 +1,78 @@
21 +# Copyright 1999-2015 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI="5"
26 +
27 +inherit toolchain-funcs
28 +
29 +DESCRIPTION="A standalone anti-spam greylisting algorithm on top of Postfix"
30 +HOMEPAGE="http://www.gasmi.net/gld.html"
31 +SRC_URI="http://www.gasmi.net/down/${P}.tgz"
32 +
33 +LICENSE="GPL-2"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~ppc ~x86"
36 +IUSE="libressl postgres"
37 +# Not adding a mysql USE flag. The package defaults to it, so we will too.
38 +DEPEND="sys-libs/zlib
39 + !libressl? ( dev-libs/openssl:0 )
40 + libressl? ( dev-libs/libressl )
41 + !postgres? ( virtual/mysql )
42 + postgres? ( dev-db/postgresql:*[server] )"
43 +RDEPEND="${DEPEND}"
44 +
45 +src_prepare() {
46 + sed -i gld.conf \
47 + -e 's:^LOOPBACKONLY=.*:LOOPBACKONLY=1:' \
48 + -e 's:^#USER=.*:USER=nobody:' \
49 + -e 's:^#GROUP=.*:GROUP=nobody:' \
50 + || die "sed gld.conf failed"
51 +
52 + sed -i Makefile.in \
53 + -e '/ -c /{s|-O2|$(CFLAGS)|g}' \
54 + -e '/ -o /{s|-O2|$(CFLAGS) $(LDFLAGS)|g}' \
55 + -e '/strip/d' \
56 + || die "sed Makefile.in failed"
57 +
58 + sed -i tables.{my,pg}sql \
59 + -e '/ip char/s/16/39/' \
60 + || die "sed sql tables failed"
61 +}
62 +
63 +src_configure() {
64 + tc-export CC
65 + # It's kind of weird. $(use_with postgres pgsql) won't work if you don't
66 + # use it...
67 + if use postgres ; then
68 + myconf="${myconf} --with-pgsql"
69 + fi
70 +
71 + econf ${myconf}
72 +}
73 +
74 +src_install() {
75 + dobin gld
76 +
77 + insinto /etc
78 + newins gld.conf gld.conf.example
79 +
80 + dodoc HISTORY README*
81 +
82 + insinto /usr/share/${PN}/sql
83 + doins *.pgsql *-whitelist.sql "${FILESDIR}"/tables.sql
84 +
85 + newinitd "${FILESDIR}"/gld.rc gld
86 +}
87 +
88 +pkg_preinst() {
89 + elog "Please read the README file in /usr/share/doc/${PF} for"
90 + elog "details on how to setup gld."
91 + elog
92 + elog "The sql files have been installed to /usr/share/${PN}/sql."
93 + if [[ $REPLACING_VERSIONS == "1.7-r1" ]]; then
94 + elog "You might want to use the ALTER_TABLE command to change the"
95 + elog "ip field width to 39 chars to accomodate ipv6 addresses."
96 + elog "Please see your sql server documentation."
97 + fi
98 +}