summaryrefslogtreecommitdiff
blob: aec0844478beb88e2fdfa6317fe5805552c743f5 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-mail/automx/automx-0.8_rc1.ebuild,v 1.1 2012/03/15 10:58:21 mschiff Exp $

EAPI=4
PYTHON_DEPEND="2:2.6:2.7"
SUPPORT_PYTHON_ABIS="1"
inherit python

DESCRIPTION="A mail user agent auto configuration service"
HOMEPAGE="http://www.automx.org"
SRC_URI="${HOMEPAGE}/download/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc +tools"

DEPEND=""
RDEPEND="
	dev-python/lxml
	|| ( www-apache/mod_wsgi www-servers/uwsgi )
	tools? ( net-dns/bind-tools )
	tools? ( net-misc/wget )
	"

RESTRICT_PYTHON_ABIS="2.[45]"

#src_prepare() {
#	python_copy_sources
#	python_src_prepare
#}

src_install() {
	dodoc INSTALL CREDITS

	if use doc; then
		dohtml -r doc/html/*

		docinto examples
		dodoc doc/examples/*
	fi

	doman doc/man/man5/*

	if use tools; then
		exeinto /usr/bin
		doexe src/automx-test
		doman doc/man/man1/automx-test.1
	fi

	installation() {
		insinto $(python_get_sitedir)/${PN}
		doins src/automx/*
	}
	python_execute_function installation
}

pkg_postinst() {
	python_mod_optimize ${PN}
	einfo
	einfo "See /usr/share/doc/${PF}/INSTALL.bz2 for setup instructions"
	einfo
}

pkg_postrm() {
	python_mod_cleanup ${PN}
}