aboutsummaryrefslogtreecommitdiffstats
path: root/net-libs/npm/npm-1.0.105.ebuild
blob: f5fcb047e8d6886a1267ab972dc9130b5b1c1966 (plain) (blame)
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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
inherit eutils

DESCRIPTION="A package manager for nodejs."
HOMEPAGE="http://npmjs.org"
SRC_URI="http://registry.npmjs.org/npm/-/${P}.tgz"

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

DEPEND=""
RDEPEND="${DEPEND} net-libs/nodejs"

S="${WORKDIR}/package"

src_configure() {
	econf --prefix="${D}usr/" || die
}

src_install() {
	emake DESTDIR="${D}usr/" install || die
	dodoc README.md CHANGES || die
	dodoc -r doc/ || die

	# fix npm paths
	sed -i "s~${D}usr~@PREFIX@~" ${D}usr/lib/node_modules/npm/npmrc
}

pkg_postinst() {
	#fix npm paths
	sed -i "s~@PREFIX@~${ROOT}usr/~" ${ROOT}usr/lib/node_modules/npm/npmrc
}