summaryrefslogtreecommitdiff
blob: 31e93c5a7849a65ec9da41a01ab4ed4c9780d2ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-filter/gld/gld-1.5.ebuild,v 1.5 2005/06/05 11:55:22 hansmi Exp $

DESCRIPTION="A standalone anti-spam greylisting algorithm on top of Postfix"
HOMEPAGE="http://www.gasmi.net/gld.html"
SRC_URI="http://www.gasmi.net/down/${P}.tgz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE=""
DEPEND="virtual/libc
	dev-db/mysql
	sys-libs/zlib
	>=dev-libs/openssl-0.9.6"
RDEPEND="${DEPEND}
	>=mail-mta/postfix-2.1"

MY_P="${P}.1"
S="${WORKDIR}/${MY_P}"

src_unpack() {
	unpack ${A}
	cd ${S}
#	cp ${FILESDIR}/Makefile.in ${S}/Makefile.in
}

src_compile() {
	econf || die "econf failed"
	emake || die "emake failed"
}

src_install() {
	dobin gld

	insinto /etc
	newins gld.conf gld.conf.sample
	dosed 's:^LOOPBACKONLY=.*:LOOPBACKONLY=1:' /etc/gld.conf.sample
	dosed 's:^#USER=.*:USER=nobody:' /etc/gld.conf.sample
	dosed 's:^#GROUP=.*:GROUP=nobody:' /etc/gld.conf.sample

	dodoc HISTORY LICENSE README*

	dodir /usr/share/doc/${PF}/sql
	insinto /usr/share/doc/${PF}/sql
	doins table*

	newinitd ${FILESDIR}/gld.rc gld
}

pkg_postinst() {
	echo
	einfo "Please read /usr/share/doc/${PF}/README.gz for details on how to setup"
	einfo "gld."
	echo
	einfo "The tables.*sql files are located at /usr/share/doc/${PF}/sql."
	echo
}