# Contributor: V.Krishn # Maintainer: Natanael Copa pkgname=libwebsockets pkgver=3.2.1 pkgrel=1 pkgdesc="C library for lightweight websocket clients and servers" url="https://libwebsockets.org" arch="all" license="LGPL-2.0-or-later" options="!check" makedepends="cmake zlib-dev openssl-dev" subpackages="$pkgname-doc $pkgname-dev $pkgname-test:_test" source="libwebsockets-$pkgver.tar.gz::https://github.com/warmcat/libwebsockets/archive/v$pkgver.tar.gz" build() { mkdir -p "$builddir"/build cd "$builddir"/build cmake .. \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_VERBOSE_MAKEFILE=TRUE make } # TODO: Use test subpkg to validate check() { make check } package() { install -Dm644 LICENSE \ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE make -C build DESTDIR="$pkgdir" install } _test() { pkgdesc="$pkgdesc (test server)" mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/share "$pkgdir"/usr/bin "$subpkgdir"/usr/ } sha512sums="a2d30a7a0416a26484743efdaa8635542480a74b0ef0f6e172dab5de4688486efb13457fc8a884d9916f76322cab0cbc9ab675f496558edd1dd9b833d087207d libwebsockets-3.2.1.tar.gz"