# Contributor: Díaz Urbaneja Diego # Maintainer: Díaz Urbaneja Diego pkgname=paho-mqtt-c pkgver=1.3.12 pkgrel=0 pkgdesc="Fully fledged MQTT client written in ANSI standard C" url="https://www.eclipse.org/paho/clients/c/" arch="all" license="EPL-1.0" makedepends="cmake openssl-dev samurai" subpackages="$pkgname-dev $pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/eclipse/paho.mqtt.c/archive/v$pkgver.tar.gz" builddir="$srcdir/paho.mqtt.c-$pkgver" options="!check" # todo build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi cmake -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=None \ -DPAHO_WITH_SSL=TRUE \ -DPAHO_ENABLE_TESTING="$(want_check && echo ON || echo OFF)" \ $CMAKE_CROSSOPTS cmake --build build } check() { ctest --test-dir build --output-on-failure } package() { DESTDIR="$pkgdir" cmake --install build # install man pages install -Dm644 docs/*/man/man3/*.3 \ -t "$pkgdir"/usr/share/man/man3/ } sha512sums=" 3152b557a8ab7c9b9c80277283e0f5e9965ce4c2ebbdaef0f238908d49e6fa1281aa72932ea112a836144b79656e4abe6e0cbd93840429a52e501a2c6b12d313 paho-mqtt-c-1.3.12.tar.gz "