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

Valery Kartel
Details
Message ID
<20170310144142.26212-1-valery.kartel@gmail.com>
Sender timestamp
1489156902
DKIM signature
missing
Download raw message
Patch: +10 -7
---
 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
@@ -2,20 +2,21 @@
 # Maintainer: Jakub Jirutka <jakub@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 \
@@ -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@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---