# Contributor: V.Krishn # Maintainer: Natanael Copa pkgname=libwebsockets pkgver=2.4.0 pkgrel=0 pkgdesc="C library for lightweight websocket clients and servers" url="http://libwebsockets.org" arch="all" license="LGPL2+" 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 make } package() { cd "$builddir" 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="89ccc24b44e4f38f3b3918634dc5f2be78be1ea9fc1748064c8a54adae026c410bfc743caf9bbd304c312e34e624f5f8fb101d7b36052af9b94dbf309625ec0a libwebsockets-2.4.0.tar.gz"