aboutsummaryrefslogtreecommitdiffstats
path: root/community/ws/APKBUILD
blob: 81f1f210df122418e301d4329e8a337a8ff24b53 (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=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"