aboutsummaryrefslogtreecommitdiffstats
path: root/community/wrk/APKBUILD
blob: 0f39c766a3e13375c968a1f910aa608002a95cb5 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=wrk
pkgver=4.1.0
pkgrel=1
pkgdesc="wrk is a modern HTTP benchmarking tool"
url="https://github.com/wg/wrk"
# requires -march=i586 to build on x86
arch="x86_64 aarch64"
license="Apache-2.0"
depends=""
depends_dev=""
options="!check" # upstream does not provide tests
makedepends="openssl-dev perl-dev linux-headers luajit-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/wg/wrk/archive/$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	# see https://github.com/wg/wrk/issues/310
	touch buildinf.h
	make -j1 -C "$builddir" \
		WITH_OPENSSL=/usr \
		WITH_LUAJIT=/usr CFLAGS+=$(pkg-config --cflags luajit)
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/usr/bin \
		"$pkgdir"/usr/share/licenses/$pkgname \
		"$pkgdir"/usr/share/doc/$pkgname/scripts

        install -m755 -D $pkgname "$pkgdir"/usr/bin/$pkgname
	install -m644 -D README.md "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 -D LICENSE "$pkgdir"/usr/share/licenses/$pkgname/
	install -m644 -D NOTICE "$pkgdir"/usr/share/doc/$pkgname/
	install -m755 -D scripts/* "$pkgdir"/usr/share/doc/$pkgname/scripts/
}

sha512sums="2c8d05f8e40c3a6234bc1c2862157764532a39046860210fe512c260c2b940e1e3120b831d0721c936c7bca474574600cda1f4c949b53738199d98102e32cb1a  wrk-4.1.0.tar.gz"