aboutsummaryrefslogtreecommitdiffstats
path: root/net-libs/npm/npm-1.0.105.ebuild
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2011-11-16 12:01:39 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2011-11-16 19:00:22 +0100
commit071bbbc40127afcaec75fc0ae31814344e5aa9c7 (patch)
tree957584862e3292475869c3fea6b9bf3ddf6c22c6 /net-libs/npm/npm-1.0.105.ebuild
parent3e437c5d5dac8e02403a49e6f105151b5d9cb1ef (diff)
downloadoverlay-071bbbc40127afcaec75fc0ae31814344e5aa9c7.tar.gz
overlay-071bbbc40127afcaec75fc0ae31814344e5aa9c7.tar.xz
overlay-071bbbc40127afcaec75fc0ae31814344e5aa9c7.zip
net-libs/npm: added doc useflag
Diffstat (limited to '')
-rw-r--r--net-libs/npm/npm-1.0.105.ebuild19
1 files changed, 14 insertions, 5 deletions
diff --git a/net-libs/npm/npm-1.0.105.ebuild b/net-libs/npm/npm-1.0.105.ebuild
index f5fcb04..ef9ff0b 100644
--- a/net-libs/npm/npm-1.0.105.ebuild
+++ b/net-libs/npm/npm-1.0.105.ebuild
@@ -12,7 +12,7 @@ SRC_URI="http://registry.npmjs.org/npm/-/${P}.tgz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
-IUSE=""
+IUSE="doc"
DEPEND=""
RDEPEND="${DEPEND} net-libs/nodejs"
@@ -25,14 +25,23 @@ src_configure() {
src_install() {
emake DESTDIR="${D}usr/" install || die
- dodoc README.md CHANGES || die
- dodoc -r doc/ || 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
+ 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
+ sed -i "s~@PREFIX@~${ROOT}usr/~" "${ROOT}usr/lib/node_modules/npm/npmrc"
}