Mail archive
alpine-aports

[alpine-aports] [PATCH 1/2] testing/cmocka: separate -dev subpackage

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Fri, 10 Mar 2017 16:41:42 +0200

---
 testing/cmocka/APKBUILD | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/testing/cmocka/APKBUILD b/testing/cmocka/APKBUILD
index 34027a4871..a78b818a6e 100644
--- a/testing/cmocka/APKBUILD
+++ b/testing/cmocka/APKBUILD
_at_@ -2,20 +2,21 @@
 # Maintainer: Jakub Jirutka <jakub_at_jirutka.cz>
 pkgname=cmocka
 pkgver=1.1.0
-pkgrel=0
+pkgrel=1
 pkgdesc="An elegant unit testing framework for C with support for mock objects"
 url="https://cmocka.org/"
 arch="all !aarch64"
 license="ASL-2.0"
 depends=""
 makedepends="cmake"
+subpackages="$pkgname-dev"
 source="https://cmocka.org/files/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
 builddir="$srcdir/$pkgname-$pkgver"
 
 build() {
-	cd "$builddir"
+	mkdir -p "$builddir"/build || return 1
+	cd "$builddir"/build
 
-	mkdir build; cd build
 	cmake .. \
 		-DCMAKE_INSTALL_PREFIX=/usr \
 		-DBUILD_SHARED_LIBS=True \
_at_@ -23,13 +24,15 @@ build() {
 		-DCMAKE_C_FLAGS="$CFLAGS" \
 		-DUNIT_TESTING=ON \
 		|| return 1
-	make && make test
+	make
 }
 
-package() {
-	cd "$builddir"/build
+check() {
+	make -C "$builddir"/build test
+}
 
-	make DESTDIR="$pkgdir" install
+package() {
+	make -C "$builddir"/build DESTDIR="$pkgdir" install
 }
 
 md5sums="59c9aa5735d9387fb591925ec53523ec  cmocka-1.1.0.tar.xz"
-- 
2.11.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Mar 10 2017 - 16:41:42 GMT