# Contributor: Leo # Maintainer: Leo pkgname=ws pkgver=8.1.4 pkgrel=0 pkgdesc="websocket and http client and server command line swiss army" options="!check" url="https://github.com/machinezone/IXWebSocket" arch="all" license="BSD-3-Clause" makedepends="cmake openssl-dev zlib-dev jsoncpp-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/machinezone/IXWebSocket/archive/v$pkgver.tar.gz" builddir="$srcdir/IXWebSocket-$pkgver" build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi mkdir build && cd build cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DUSE_TLS=1 \ -DUSE_WS=1 \ ${CMAKE_CROSSOPTS} .. make } package() { make -C build DESTDIR="$pkgdir" install # We don't care about anything but the ws binary rm -rf "$pkgdir"/usr/include rm -rf "$pkgdir"/usr/lib } sha512sums="3d98d06e3f75501306b5df1de77a2e324e736bdfcd6d2a1d4bab4966e19b2bf4b625d00b18654e7a007144e897abb29f2a046f24d69c0e4ca5c0b05fc0c9b976 ws-8.1.4.tar.gz"