summaryrefslogtreecommitdiff
blob: 5227abcc877c43a7f51b88ad9c619faa34c60c65 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-filter/anubis/anubis-3.9.95.ebuild,v 1.2 2004/09/08 20:32:44 ticho Exp $

inherit eutils

DESCRIPTION="GNU Anubis is an outgoing mail processor."
HOMEPAGE="http://www.gnu.org/software/anubis/"

SRC_URI="ftp://mirddin.farlep.net/pub/alpha/anubis/${P}.tar.gz"

# Hasn't propergated much at time of commit.
# SRC_URI="mirror://gnu/anubis/${P}.tar.gz"
LICENSE="GPL-2"

SLOT="0"
KEYWORDS="~x86 ~ppc"
IUSE="crypt dbm guile mysql postgres nls pam pcre sasl socks5 ssl tcpd"

DEPEND="crypt? ( >=app-crypt/gpgme-0.9.0 )
	dbm? ( sys-libs/gdbm )
	guile? ( >=dev-util/guile-1.6 )
	mysql? ( dev-db/mysql )
	pam?   ( >=sys-libs/pam-0.75 )
	postgres? ( dev-db/postgresql )
	nls? ( sys-devel/gettext )
	pcre? ( >=dev-libs/libpcre-3.9 )
	sasl? ( virtual/gsasl )
	ssl?   ( >=dev-libs/openssl-0.9.6 )
	tcpd?  ( >=sys-apps/tcp-wrappers-7.6 )"

# has gnutls=1.0.0 option that is incompatible with ssl

src_unpack() {
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/${PV}-transmode.c.patch
	epatch ${FILESDIR}/${PV}-authmode.c.patch
}

src_compile() {
	local myconf="--with-unprivileged-user=anubis"

	use crypt || myconf="${myconf} --without-gpgme"
	if [ -x ${ROOT}/usr/bin/gpg2 ];
	then
		GPG=${ROOT}/usr/bin/gpg2
	else
		GPG=${ROOT}/usr/bin/gpg
	fi

	use ssl  && myconf="${myconf} --with-openssl"
	use tcpd && myconf="${myconf} --with-tcp-wrappers"
	use socks5 && myconf="${myconf} --with-socks-proxy"

	econf ${myconf} `use_with mysql` `use_with postgres` \
		`use_with pam` `use_with pcre` `use_with nls` \
		`use_with guile` `use_with dbm` `use_with sasl gsasl` \
		|| die

	emake -j1 || die
	# parallel make fails in testsuite
}

pkg_setup() {
	enewuser anubis
}

pkg_preinst() {
	enewuser anubis
}

src_test() {
	cd ${S}/testsuite
	emake -j1
}

src_install() {
	emake DESTDIR=${D} install
}