aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ostinato/APKBUILD
blob: 8abe68d8a26ef3c3ef1e960deca413812cf38818 (plain) (blame)
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
# Maintainer: Corentin Henry <corentinhenry@gmail.com>
# Contributor: Corentin Henry <corentinhenry@gmail.com>
pkgname=ostinato
pkgver=1.1
pkgrel=1
pkgdesc="Packet/Traffic Generator and Analyzer"
url="https://www.ostinato.org"
arch="all"
license="GPL-3.0-or-later"
options="!check" # make test does nothing
makedepends="libnl3-dev libpcap-dev protobuf-dev qt5-qtbase-dev
	qt5-qtscript-dev qt5-qtsvg-dev"
subpackages="$pkgname-drone $pkgname-gui"
source="$pkgname-$pkgver.tar.gz::https://github.com/pstavirs/ostinato/archive/v$pkgver.tar.gz
	ModelTest.patch
	"
	# ModelTest::ModelTest is included and needed during linking even in release mode

build() {
	qmake-qt5 PREFIX=/usr

	# Parallel build fails on armv7 with:
	# fatal error: protocol.pb.h: No such file or directory
	# qmake generates broken CFLAGS, demand it use ours
	# also keep DEFINES because of #11848
	make -j1 CXXFLAGS="$CXXFLAGS \$(DEFINES)"
}

package() {
	make INSTALL_ROOT="$pkgdir" install
}

drone() {
	pkgdesc="ostinato controller"

	install -d "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/drone "$subpkgdir"/usr/bin/drone
}

gui() {
	pkgdesc="graphical controller for ostinato"
	depends="qt5-qtsvg" # 11849

	install -d "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/ostinato "$subpkgdir"/usr/bin/ostinato
}

sha512sums="a45e157d155d4f2efe9a1594a140647b5cbd7264985b15a9ed47d86198c9df9d763170097dcfd40fae1317206e53c9155f08c48c747cce458e0cae7f3a841449  ostinato-1.1.tar.gz
e0a3d2781c62b1898a80af8522b36d6b1a7aeae9831c33c42e4e76fe002ee7ebff50d432508a18046d7b5988f09d9a9f90a0433cfae1d2c1cbeaf664671abf6c  ModelTest.patch"