summaryrefslogtreecommitdiff
blob: 5ea2e2ed32d41c31be43fed8c3125816065dddf0 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
PYTHON_COMPAT=( python{2_6,2_7} )

inherit eutils distutils-r1 python-r1

MY_PV=${PV/_/-}
MY_P="Netzob-${PV}"

DESCRIPTION="Network protocol modelization by reverse engineering"
HOMEPAGE="http://www.netzob.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
		 http://www.netzob.org/repository/${MY_PV}/${MY_P}.tar.gz"

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

RDEPEND="
	dev-python/impacket
	dev-util/strace
	sys-process/lsof
	>=dev-python/lxml-2.3
	dev-python/bitarray
	dev-python/Babel
	dev-python/pygobject:3
	dev-python/pcapy
	dev-python/python-ptrace
	>=dev-python/httplib2-0.7.0
	media-gfx/graphviz"
DEPEND="${RDEPEND}
	>=dev-python/setuptools-0.6.30-r1
	doc? ( >=dev-python/sphinx-1.1.3 )"

S="${WORKDIR}/${MY_P}"
DOCS=( README.rst AUTHORS.txt NEWS.rst COPYING.txt )
HTML_DOCS=( doc/documentation/html/ )

src_compile() {
	distutils-r1_src_compile

	if use doc; then
		einfo "Generation of documentation"
		pushd doc/documentation >/dev/null
		sphinx-build -b html source html || die "Generation of documentation failed"
		popd >/dev/null
	fi
}

src_install() {
	distutils-r1_src_install

	doman doc/netzob.1
}