aboutsummaryrefslogtreecommitdiffstats
path: root/main/libuv/APKBUILD
blob: 621e1bbe40178498b39af35ea2f251d1a6527018 (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.27
_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="8bc14dc254363092bd36919ea05cc9ab  libuv-v0.10.27.tar.gz"
sha256sums="0c5313983f0c19f5416099516595c1a28a4ef5a8dcbbf32774b7203788543259  libuv-v0.10.27.tar.gz"
sha512sums="b2dd49491ff21e2eec2442b501ba1e5af8d9c8275afa577d0b140af6697c0d4b1be93e6c10384b381d92b7534e19e841b73898295b48ad42b6525bc1a8c06278  libuv-v0.10.27.tar.gz"