blob: e6cf70a3b4a8a931504c0441ed4766e5656b5173 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=ws
pkgver=8.0.0
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="e274a8bfc9cc11aace683e81ec74ae763f0fcca2f17c2f22ab3682ebe2ad17451cb9a1eed8f2239d7700236419497779a9ff801e034041d7482682100d1a4793 ws-8.0.0.tar.gz"
|