summaryrefslogtreecommitdiff
blob: 991d848c6754c13d2e06cc7275b6282e0fcdd9d3 (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
EAPI=4
PYTHON_DEPEND="2:2.6"
SUPPORT_PYTHON_ABIS="1"

inherit distutils git-2

MY_P="Netzob-${PV}"

DESCRIPTION="Network protocol modelization by reverse engineering"
HOMEPAGE="http://www.netzob.org/"
EGIT_REPO_URI="https://dev.netzob.org/git/netzob.git"

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

RDEPEND="
	dev-python/pcapy
	dev-python/impacket
	dev-python/pygtk
	>=dev-python/python-ptrace-0.4.1
	dev-python/matplotlib
	dev-util/strace
	sys-process/lsof
	>=dev-python/lxml-2.3
	dev-python/bitarray
"
DEPEND="${RDEPEND}
	doc? ( dev-python/sphinx )"

RESTRICT_PYTHON_ABIS="3.*"

S="${WORKDIR}/${MY_P}"
DOCS="README.txt AUTHORS.txt NEWS.txt COPYING.txt"

src_prepare() {
	distutils_src_prepare
	sed -i "s;resources/static;/usr/share/netzob;" src/netzob/NetzobResources.py || die
}

src_compile() {
	distutils_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_src_install

	if use doc; then
		dohtml -r doc/documentation/html/* || die "dohtml failed"
	fi
}