Commit ef56b819 authored by Valery Kartel's avatar Valery Kartel Committed by Leonardo Arena

testing/cmocka: separate -dev subpackage

parent f555a715
...@@ -2,20 +2,21 @@ ...@@ -2,20 +2,21 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=cmocka pkgname=cmocka
pkgver=1.1.0 pkgver=1.1.0
pkgrel=0 pkgrel=1
pkgdesc="An elegant unit testing framework for C with support for mock objects" pkgdesc="An elegant unit testing framework for C with support for mock objects"
url="https://cmocka.org/" url="https://cmocka.org/"
arch="all !aarch64" arch="all !aarch64"
license="ASL-2.0" license="ASL-2.0"
depends="" depends=""
makedepends="cmake" makedepends="cmake"
subpackages="$pkgname-dev"
source="https://cmocka.org/files/${pkgver%.*}/$pkgname-$pkgver.tar.xz" source="https://cmocka.org/files/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
builddir="$srcdir/$pkgname-$pkgver" builddir="$srcdir/$pkgname-$pkgver"
build() { build() {
cd "$builddir" mkdir -p "$builddir"/build || return 1
cd "$builddir"/build
mkdir build; cd build
cmake .. \ cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=True \ -DBUILD_SHARED_LIBS=True \
...@@ -23,13 +24,15 @@ build() { ...@@ -23,13 +24,15 @@ build() {
-DCMAKE_C_FLAGS="$CFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \
-DUNIT_TESTING=ON \ -DUNIT_TESTING=ON \
|| return 1 || return 1
make && make test make
} }
package() { check() {
cd "$builddir"/build 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" md5sums="59c9aa5735d9387fb591925ec53523ec cmocka-1.1.0.tar.xz"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment