summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9ba12cb46b7b104cefb64667e0e5376f76e39479 (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
# Maintainer: Anton Leontiev <scileont /at/ gmail.com>
pkgname=tinymembench-git
pkgver=0.3.r6.g95e6847
pkgrel=1
pkgdesc='Simple benchmark for memory throughput and latency'
arch=('i686' 'x86_64' 'armv7h')
depends=('glibc')
makedepends=('git')
license=('MIT')
url='https://github.com/ssvb/tinymembench'
source=("${pkgname%-git}::git+https://github.com/ssvb/tinymembench.git")
md5sums=('SKIP')

pkgver() {
	local name=${pkgname%-git}
	cd $name
	git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}

build() {
	local name=${pkgname%-git}
	cd $name
	make
}

package() {
	local name=${pkgname%-git}
	cd $name
	install -Dm755 $name "$pkgdir"/usr/bin/$name
	sed '/\*\//Q; /\/\*/d; s/ *\* *//' main.c > LICENSE
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}