# Contributor: Leo # Maintainer: Leo pkgname=ws pkgver=7.5.3 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="ec40bd0204b183ce5ad070b86601efaa5860e33445fd99186b38162860e6c9a6b43e1c564bcbd3a225f19efc23801e9d027863516dd7262e49130d73cc053f79 ws-7.5.3.tar.gz"