# Contributor: V.Krishn # Maintainer: Natanael Copa pkgname=libwebsockets pkgver=2.2.1 pkgrel=0 pkgdesc="C library for lightweight websocket clients and servers" url="http://libwebsockets.org" arch="all" license="LGPL2.1" makedepends="cmake zlib-dev libressl-dev" subpackages="$pkgname-doc $pkgname-dev $pkgname-test:_test" source="$pkgname-$pkgver.tar.gz::https://github.com/warmcat/$pkgname/archive/v$pkgver.tar.gz" builddir="$srcdir/$pkgname-$pkgver" build() { mkdir -p "$builddir"/build cd "$builddir"/build cmake .. \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ || return 1 make } package() { cd "$builddir" install -Dm644 LICENSE \ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE || return 1 make -C build DESTDIR="$pkgdir" install || return 1 } _test() { pkgdesc="$pkgdesc (test server)" mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/share "$pkgdir"/usr/bin "$subpkgdir"/usr/ } sha512sums="c2b4742553ce5ac04e922b3d14f776da83845bc7ef5dd030ef54818ac2becbfdd4285fb0b4429d6cda21620fddab528ae736232a523bd13803545af44dd7d3b6 libwebsockets-2.2.1.tar.gz"