blob: 861c62c75a6adb64d3c3636d3253b30fbc4a0161 (
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
50
51
52
53
54
55
56
57
|
# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libwebsockets
pkgver=2.1.0
pkgrel=0
pkgdesc="C library for lightweight websocket clients and servers"
url="http://libwebsockets.org"
arch="all"
license="LGPL2.1"
depends=
depends_dev=""
makedepends="$depends_dev cmake zlib-dev libressl-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-test:_test"
source="$pkgname-$pkgver.tar.gz::https://github.com/warmcat/libwebsockets/archive/v$pkgver.tar.gz
"
_srcdir="${srcdir}"/libwebsockets-$pkgver
_builddir="${srcdir}/build"
prepare() {
cd "$_srcdir"
for i in $source; do
case $i in
*.patch)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || return 1
;;
esac
done
}
build() {
mkdir "$_builddir"
cd "$_builddir"
cmake -DCMAKE_INSTALL_PREFIX=/usr \
"$_srcdir" || return 1
make
}
package() {
cd "$_srcdir"
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE || return 1
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
rm -f "$pkgdir"/usr/lib/*.a
}
_test() {
pkgdesc="$pkgdesc - test server"
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/share "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
md5sums="4df3be57dee43aeebd54a3ed56568f50 libwebsockets-2.1.0.tar.gz"
sha256sums="bcc96aaa609daae4d3f7ab1ee480126709ef4f6a8bf9c85de40aae48e38cce66 libwebsockets-2.1.0.tar.gz"
sha512sums="57d40d7ee90032ad8abe1463ade3256ae23a18e78175a55095cffe8e5d19acbc67239090248df48fef19339d8bf89ee633ae5909facc0f6c7655f3bfecf5f358 libwebsockets-2.1.0.tar.gz"
|