aboutsummaryrefslogtreecommitdiffstats
path: root/testing/cpputest/APKBUILD
blob: dea7ee6ed8b8dc4ba3e1957350d842cf3b54514b (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
# Contributor: Shiva Velmurugan <shiv@shiv.me>
# Maintainer: Shiva Velmurugan <shiv@shiv.me>
pkgname=cpputest
pkgver=3.8
pkgrel=1
pkgdesc="A unit testing and mocking framework for C/C++"
url="http://cpputest.github.io/"
arch="all"
license="BSD"
options="!dbg"
makedepends="cmake"
subpackages="$pkgname-doc"
source="https://github.com/cpputest/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build

	cmake .. -DCMAKE_INSTALL_PREFIX=/usr
	make
}

check() {
	cd "$builddir"/build
	make test
}

package() {
	cd "$builddir"/build

	make DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/lib/cmake
	mv "$pkgdir"/usr/lib/CppUTest/cmake \
		"$pkgdir"/usr/lib/cmake/CppUTest
	rmdir "$pkgdir"/usr/lib/CppUTest

	install -Dm644 ../COPYING \
		"$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

md5sums="e8fdbbb5dd37d32d65919f240f984905  cpputest-3.8.tar.gz"
sha256sums="c81dccc5a1bfc7fc6511590c0a61def5f78e3fb19cb8e1f889d8d3395a476456  cpputest-3.8.tar.gz"
sha512sums="a9592bdc9ffab8b42026ef2010f504e7e37d77fc2f197f89d23f7c9285a101059a0ec66418b914db0383974616d31b26addd1938fb27f45c3e7d9496ed0a0fac  cpputest-3.8.tar.gz"