aboutsummaryrefslogtreecommitdiffstats
path: root/community/libmpack/APKBUILD
blob: 1f62a9392aa4e66d31bc6c46a0b02a7492d4b7f3 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=libmpack
pkgver=1.0.5
pkgrel=0
pkgdesc="Simple implementation of msgpack in C"
url="https://github.com/libmpack/libmpack"
arch="all"
license="MIT"
makedepends="libtool"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/libmpack/$pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	make
}

check() {
	local out
	cd "$builddir"

	# Tests prints thousands lines, so print only last few when fails.
	out=$(make test) || {
		echo "Tests failed, printing last 50 lines of the output..."
		printf '%s\n' "$out" | tail -n 50
		return 1
	}
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" PREFIX=/usr install
}

sha512sums="6e30edafcacfb580b410bc6749ed7fe8f18b3be0cb98959339853e77bc3ec0cda6df08a0f1f22768cfc773458a2ea6bcef4f0421eea55cf56c58981d13711a04  libmpack-1.0.5.tar.gz"