aboutsummaryrefslogtreecommitdiffstats
path: root/main/libuv/APKBUILD
blob: 49147a717bffb414c9e982ec6ff2ed43ffcc1ac1 (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
58
59
60
61
62
63
64
65
66
67
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libuv
pkgver=0.10.28
_sover=${pkgver%.*}
pkgrel=0
pkgdesc="Cross-platform asychronous I/O"
url="http://libuv.org"
arch="all"
license="MIT and BSD and ISC"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev"
source="http://libuv.org/dist/v$pkgver/libuv-v$pkgver.tar.gz"

_builddir="$srcdir"/libuv-v$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	make CFLAGS="$CFLAGS -D__USE_MISC" BUILDTYPE=Release
}

package() {
	cd "$_builddir"
	#manually install
	install -d "$pkgdir"/usr/lib
	cp libuv.so "$pkgdir"/usr/lib/libuv.so.$_sover || return 1
	ln -s libuv.so.$_sover "$pkgdir"/usr/lib/libuv.so.${_sover%.*}
	ln -s libuv.so.$_sover "$pkgdir"/usr/lib/libuv.so

	install -d "$pkgdir"/usr/include/uv-private
	cp include/uv.h "$pkgdir"/usr/include/ || return 1
	cp include/uv-private/ngx-queue.h \
		include/uv-private/tree.h \
		include/uv-private/uv-linux.h \
		include/uv-private/uv-unix.h \
		"$pkgdir"/usr/include/uv-private/ || return 1

	install -d "$pkgdir"/usr/lib/pkgconfig
	cat > "$pkgdir"/usr/lib/pkgconfig/libuv.pc <<EOF
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include

Name: libuv
Description: Development libraries for libuv
Version: @version@
Libs: -L${libdir} -luv -lrt -ldl
Cflags:
URL: http://nodejs.org/
EOF
}

md5sums="1a3e1a44e76df606f2b802ac81481949  libuv-v0.10.28.tar.gz"
sha256sums="55d04cfdbfd5239160556c1a1b47220cc17fe056168bcdbe74f18143a8011041  libuv-v0.10.28.tar.gz"
sha512sums="782469715f788f9bbd54ab223c938e4a1c934034a93e7118ff01001ad37a997ed9907da206d4b788e046ab09f5d7d320662ef27200e43ba83a6b38b5b8f3ebe1  libuv-v0.10.28.tar.gz"