summaryrefslogtreecommitdiff
blob: 6713366d94822fced97a2e6eb23e4e3daa20e1ae (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5
inherit autotools eutils

DESCRIPTION="A Middlebox Detection Tool"
HOMEPAGE="http://www.tracebox.org/"
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="
	dev-lang/lua
	net-libs/libcrafter
	net-libs/libpcap
"
DEPEND="
	${RDEPEND}
	virtual/pkgconfig
"

RESTRICT="test"

src_prepare() {
	epatch "${FILESDIR}"/${P}-deps.patch

	sed -i -e '/SUBDIRS/s|noinst||g' Makefile.am || die
	sed -i -e '/DIST_SUBDIRS.*libcrafter/d' noinst/Makefile.am || die

	sed -i \
		-e '/[[:graph:]]*libcrafter[[:graph:]]*/d' \
		-e '/dist_bin_SCRIPTS/d' \
		src/${PN}/Makefile.am \
		|| die

	sed -i \
		-e 's|"crafter.h"|<crafter.h>|g' \
		src/${PN}/PacketModification.h \
		src/${PN}/PartialHeader.h \
		src/${PN}/script.h \
		src/${PN}/${PN}.h \
		|| die

	rm README.md || die

	eautoreconf
}