summaryrefslogtreecommitdiff
blob: 1197e5afdc4cb5ca32c68e216428641a8a2a555d (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
NODEJS_MODULE=${PN}

inherit multilib

DESCRIPTION="Make streaming http requests."
HOMEPAGE="https://npmjs.org/package/hyperquest"
SRC_URI="http://registry.npmjs.org/${PN}/-/${P}.tgz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="example"

DEPEND=">=net-libs/nodejs-0.8.10"
RDEPEND=">=dev-nodejs/through-2.3.4
		 >=dev-nodejs/duplexer-0.1.1
		 ${DEPEND}"

src_unpack() {
	unpack "${A}"
	mv "${WORKDIR}/package" ${S}
}

src_compile() {
	true
}

src_install() {
	local node_modules="${D}/usr/$(get_libdir)/node_modules/${NODEJS_MODULE}"

	mkdir -p ${node_modules} || die "Could not create DEST folder"
	cp -r ${S}/{index.js,package.json} ${node_modules}

	dodoc readme* LICENSE

	if use example; then
		dodoc -r example
	fi
}