# Contributor: Leo # Maintainer: Leo pkgname=ws pkgver=7.8.8 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=Release \ -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="570ac5ba4bc3b8b8ed84e2f73c69173fac589645ff71070527485d70b6e3b22dcf1ad5fb95d52b2c560ee6197b5c6fa4c7629ba48ac6f8249aee057f4380e530 ws-7.8.8.tar.gz"