summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2024-03-28 21:04:06 -0300
committerGonzalo Exequiel Pedone2024-03-28 21:04:06 -0300
commitbebdfdf44a5fc87044a4d6a9346706d2e60dfc7f (patch)
tree5dc5381d57089f521dfca9966e68dd296c96f3fd
downloadaur-android-x86-64-cmocka.tar.gz
New package.
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD43
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..89de6eaa71d5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = android-x86-64-cmocka
+ pkgdesc = Elegant unit testing framework for C with support for mock objects (Android x86-64)
+ pkgver = 1.1.7
+ pkgrel = 1
+ url = https://cmocka.org/
+ arch = any
+ license = Apache
+ makedepends = android-cmake
+ depends = android-ndk
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ options = !emptydirs
+ source = https://cmocka.org/files/1.1/cmocka-1.1.7.tar.xz
+ source = https://cmocka.org/files/1.1/cmocka-1.1.7.tar.xz.asc
+ validpgpkeys = 8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D
+ md5sums = dc23f4870eb7dfa6da065f3056e815b0
+ md5sums = SKIP
+
+pkgname = android-x86-64-cmocka
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b5b03b115225
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+pkg
+src
+*.tar.xz
+*.tar.gz
+*.tar.bz2
+*.asc
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..68149eac5b01
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
+# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
+
+_android_arch=x86-64
+
+pkgname=android-${_android_arch}-cmocka
+pkgver=1.1.7
+pkgrel=1
+arch=('any')
+pkgdesc="Elegant unit testing framework for C with support for mock objects (Android ${_android_arch})"
+url='https://cmocka.org/'
+license=('Apache')
+depends=('android-ndk')
+makedepends=('android-cmake')
+source=("https://cmocka.org/files/1.1/cmocka-${pkgver}.tar.xz"{,.asc})
+options=(!strip !buildflags staticlibs !emptydirs)
+md5sums=('dc23f4870eb7dfa6da065f3056e815b0'
+ 'SKIP')
+validpgpkeys=('8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D') # Andreas Schneider <asn@cryptomilk.org>
+
+build() {
+ cd "${srcdir}/cmocka-$pkgver"
+ source android-env ${_android_arch}
+
+ mkdir -p build && pushd build
+ android-${_android_arch}-cmake \
+ -DCMAKE_CROSSCOMPILING=TRUE \
+ -DBUILD_STATIC_LIB=TRUE \
+ -DWITH_STATIC_LIB=TRUE \
+ -DUNIT_TESTING=OFF \
+ ..
+ make $MAKEFLAGS
+ popd
+}
+
+package() {
+ cd "${srcdir}/cmocka-$pkgver"
+ source android-env ${_android_arch}
+
+ make -C build DESTDIR="$pkgdir" install
+ ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
+}