blob: 3c73ea9833e8ab0e95dbbbde2bb1fa3e96ce569d (
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
40
41
42
43
44
45
46
47
48
49
|
# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libwebsockets
pkgver=3.0.0
pkgrel=0
pkgdesc="C library for lightweight websocket clients and servers"
url="http://libwebsockets.org"
arch="all"
license="LGPL-2.0-or-later"
options="!check"
makedepends="cmake zlib-dev libressl-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-test:_test"
source="$pkgname-$pkgver.tar.gz::https://github.com/warmcat/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
build() {
mkdir -p "$builddir"/build
cd "$builddir"/build
cmake .. \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=TRUE
make
}
# TODO: Use test subpkg to validate
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
install -Dm644 LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
make -C build DESTDIR="$pkgdir" install
}
_test() {
pkgdesc="$pkgdesc (test server)"
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/share "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
sha512sums="626edd00cc4f7559c67fc1663cbc4679a3c4e7a1b60944a7cf6968c6676073bbc15f9b90f4f2ea629394ebbcf84856663ae032a3557bae383bd0db54838d30e8 libwebsockets-3.0.0.tar.gz"
|