summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesus Rivero <jesus.riveroa@gmail.com>2013-07-10 10:07:03 -0400
committerJesus Rivero <jesus.riveroa@gmail.com>2013-07-10 10:07:03 -0400
commit4bfe2bdcf7670022808edd93b5abc7e0bbe32aef (patch)
treefd9a20856e1ece1732da653ab0e6802bf2c5ba87
parentAdding npm.eclass (diff)
downloadneurogeek-4bfe2bdcf7670022808edd93b5abc7e0bbe32aef.tar.gz
neurogeek-4bfe2bdcf7670022808edd93b5abc7e0bbe32aef.tar.bz2
neurogeek-4bfe2bdcf7670022808edd93b5abc7e0bbe32aef.zip
Fixes to npm.eclass and Updated ebuild
-rw-r--r--dev-nodejs/async/Manifest3
-rw-r--r--dev-nodejs/async/async-0.2.7.ebuild25
-rw-r--r--eclass/npm.eclass22
3 files changed, 17 insertions, 33 deletions
diff --git a/dev-nodejs/async/Manifest b/dev-nodejs/async/Manifest
index 13a33ff..15203f3 100644
--- a/dev-nodejs/async/Manifest
+++ b/dev-nodejs/async/Manifest
@@ -1,2 +1,3 @@
DIST async-0.2.7.tgz 15472 SHA256 6f0b4eaf5cf8b0e3bf172e49b43bd579ab84cf30b860b035812381117ce706a4 SHA512 e4130a99393370e48c3a3c7851d83056ec1512d728aa26b10bc802457c3227546a8e6589b34211471bf317ead3a45a57af7de758a8039648f38260b98ac33aa4 WHIRLPOOL b7ae3d0ddfbb79c29148188a2d6e603649db410d47ad25b0314d455f7684d5d379cd871d8252409d859e17f98c11dcce763694b411ffb8c72ee1734cc2b00f4d
-EBUILD async-0.2.7.ebuild 770 SHA256 688909640c77eb2f9802c5452084172079a13ddb91ae2aaee9a031d55da1a339 SHA512 4a3582901088375a968b31d37d2baddee1346b0027056c7d23c48e9778e19849fb212755842bb3b4ed1d219b06aef3468de2bcd11c1c2e726caa7d7f95846bd7 WHIRLPOOL 9f8166993d6bbd28bb8c665012b0edf3ecb42932d8d162be48b909a167b0da1432ade6e0452c9ab68b7d140cab36024b4ed6ecfb325ed49485a60f064795b7e9
+EBUILD async-0.2.7-r1.ebuild 770 SHA256 688909640c77eb2f9802c5452084172079a13ddb91ae2aaee9a031d55da1a339 SHA512 4a3582901088375a968b31d37d2baddee1346b0027056c7d23c48e9778e19849fb212755842bb3b4ed1d219b06aef3468de2bcd11c1c2e726caa7d7f95846bd7 WHIRLPOOL 9f8166993d6bbd28bb8c665012b0edf3ecb42932d8d162be48b909a167b0da1432ade6e0452c9ab68b7d140cab36024b4ed6ecfb325ed49485a60f064795b7e9
+EBUILD async-0.2.7.ebuild 331 SHA256 ed0de1ce0dea1bb55ddfb6faade409a628457880f8eadf1cb4f945883963ccc2 SHA512 8c768dff2294573ef987c376f756882f36be76923a1260acf929e80ac17ab0431d49cd3e0c1498cb728655981fd3cf63c63e9c5fd5bd9cb6391a8314c3a468b0 WHIRLPOOL 8bc0eecb678f36f43d0b13c19efe4b98555e38a92105be7d0fd2b7a6c87470846bd3f37268a5b01455694ddaf711d782e910602769ef9f04fd7ea5a346b9bc92
diff --git a/dev-nodejs/async/async-0.2.7.ebuild b/dev-nodejs/async/async-0.2.7.ebuild
index c9e89f9..d3f39e9 100644
--- a/dev-nodejs/async/async-0.2.7.ebuild
+++ b/dev-nodejs/async/async-0.2.7.ebuild
@@ -3,36 +3,15 @@
# $Header: $
EAPI=4
-NODEJS_MODULE=${PN}
-inherit multilib
+inherit npm
DESCRIPTION="Higher-order functions and common patterns for asynchronous code"
-HOMEPAGE="https://npmjs.org/package/async"
-SRC_URI="http://registry.npmjs.org/async/-/${P}.tgz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~x86 ~amd64"
+KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND=">=net-libs/nodejs-0.8.10"
RDEPEND="${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}/{lib,package.json} ${node_modules}
-
- dodoc README* LICENSE
-}
diff --git a/eclass/npm.eclass b/eclass/npm.eclass
index d77b9ba..745242b 100644
--- a/eclass/npm.eclass
+++ b/eclass/npm.eclass
@@ -80,24 +80,28 @@ npm_src_compile() {
# also taking care of NPM_FILES, NPM_EXTRA_FILES, NPM_DOCS and NPM_EXTRA_DOCS
npm_src_install() {
+ local npm_files="${NPM_FILES} ${NPM_EXTRA_FILES}"
local node_modules="${D}/usr/$(get_libdir)/node_modules/${NPM_MODULE}"
+
mkdir -p ${node_modules} || die "Could not create DEST folder"
- # These are basically the 'standard' files in an npm package
- # We'll handle additional files in NPM_EXTRA_FILES
- for f in "${NPM_FILES} ${NPM_EXTRA_FILES}"
+ for f in ${npm_files}
do
if [[ -e "${S}/$f" ]]; then
cp -r "${S}/$f" ${node_modules}
fi
done
- for f in "${NPM_DOCS} ${NPM_EXTRA_DOCS}"
- do
- if [[ -e "${S}/$f" ]]; then
- dodoc -r "${S}/$f"
- fi
- done
+ if use doc; then
+ local npm_docs="${NPM_DOCS} ${NPM_EXTRA_DOCS}"
+
+ for f in $npm_docs
+ do
+ if [[ -e "${S}/$f" ]]; then
+ dodoc -r "${S}/$f"
+ fi
+ done
+ fi
}
EXPORT_FUNCTIONS src_unpack src_compile src_install