blob: 9ef458cd35917a9a4ec6a915fd3450a632aaacf9 (
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.0.1
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 openssl-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() {
pkgname="$pkgdesc - test server"
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/share "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
md5sums="4963d1b7a66ad90ce3ea7be971162073 libwebsockets-2.0.1.tar.gz"
sha256sums="f98cf9e35385863cfe64a5f181403bf3113cc5d82604c4811e1373ba8676ef88 libwebsockets-2.0.1.tar.gz"
sha512sums="90a4ee45753cfca67a6093ce8ef9b3eb9dffdcd213888555d29fe09d8fdf36a6e927d121bc0cc0cd12570b2d48952501b0639e95614bf356419f6eb53cb3819d libwebsockets-2.0.1.tar.gz"
|