From 93b291cce8fd6ab130ab760ac61f7034834c87cf Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 16 Nov 2011 19:00:06 +0100 Subject: dev-util/npm: moved from net-libs --- dev-util/npm/npm-1.0.105.ebuild | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 dev-util/npm/npm-1.0.105.ebuild (limited to 'dev-util/npm/npm-1.0.105.ebuild') diff --git a/dev-util/npm/npm-1.0.105.ebuild b/dev-util/npm/npm-1.0.105.ebuild new file mode 100644 index 0000000..ef9ff0b --- /dev/null +++ b/dev-util/npm/npm-1.0.105.ebuild @@ -0,0 +1,47 @@ +# 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="doc" + +DEPEND="" +RDEPEND="${DEPEND} net-libs/nodejs" + +S="${WORKDIR}/package" + +src_configure() { + econf --prefix="${D}usr/" || die +} + +src_install() { + emake DESTDIR="${D}usr/" install || die + + # remove doc directories form wrong pathq + rm -rf "${D}usr/lib/node_modules/npm/doc/" + rm -rf "${D}usr/lib/node_modules/npm/html/" + + dodoc README.md CHANGES AUTHORS || die + if use doc ; then + # install doc and api html pages + dodoc -r html/doc/ || die + dodoc -r html/api/ || die + fi + + # 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" +} -- cgit v1.2.3