summaryrefslogtreecommitdiff
blob: a81025af5b9fa4a823914c43b95cb26a322f8cbb (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
# Copyright 2002 Arcady Genkin <agenkin@thpoon.com>
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-mail/tmda/tmda-0.70.ebuild,v 1.2 2003/03/03 15:15:42 agenkin Exp $

DESCRIPTION="Python-based SPAM reduction system"
HOMEPAGE="http://www.tmda.net/"
LICENSE="GPL-2"

DEPEND=">=dev-lang/python-2.1
	virtual/mta"

SRC_URI="http://tmda.net/releases/${P}.tgz
	http://tmda.net/releases/old/${P}.tgz"

SLOT="0"
KEYWORDS="x86 ~sparc"

S="${WORKDIR}/${P}"

src_compile () {
	./compileall || die
}

src_install () {
	# Figure out python version
	# below hack should be replaced w/ pkg-config, when we get it working
	local pv=`python -V 2>&1 | sed -e 's:Python \([0-9].[0-9]\).*:\1:'`

	# Executables
	dobin bin/tmda-*

	# The Python TMDA module
	insinto "/usr/lib/python${pv}/site-packages/TMDA"
	doins TMDA/*.py*
	insinto "/usr/lib/python${pv}/site-packages/TMDA/pythonlib/email"
	doins TMDA/pythonlib/email/*.py*

	# The templates
	insinto /etc/tmda
	doins templates/*.txt
	
	# Documentation
	dodoc COPYING ChangeLog README THANKS UPGRADE CRYPTO CODENAMES INSTALL
	dohtml -r htdocs/*.html

	# Contributed binaries and stuff
	cd ${S}/contrib

	exeinto /usr/lib/tmda/contrib
	doexe printcdb printdbm collectaddys def2html \
	      vadduser-tmda vipmap-to-authmap vmailmgr-vdir.sh vpopmail-vdir.sh

	insinto /usr/lib/tmda/contrib
	doins vtmdarc tmda.el sample.config tmda.spec
	
	# Not sure what's the best thing to do with tmda-cgi.
	# For now, installing it in a tarball under /usr/lib/tmda/contrib.
	tar cjf cgi.tar.bz2 cgi
	doins cgi.tar.bz2
}

pkg_postinst () {
	einfo
	einfo "The tmda-cgi stuff has been installed in /usr/lib/tmda-cgi.tar.bz2."
	einfo "Refer to the README file, included in the tarball."
	einfo
}