summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorAudrius Kažukauskas <audrius@neutrino.lt>2011-12-17 23:38:47 -0600
committerRobby Workman <rworkman@slackbuilds.org>2011-12-17 23:38:47 -0600
commit77766d1785a073a89a1408c27b377c3b79618ae1 (patch)
tree07ace6fa3b2245d67563203b5dab5418099270ac /network
parent9d2aeabb209ea6e3f7fe394fdc2b3d3810cd9b3b (diff)
downloadslackbuilds-77766d1785a073a89a1408c27b377c3b79618ae1.tar.gz
network/node: Updated for version 0.6.6.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/node/node.SlackBuild25
-rw-r--r--network/node/node.info8
-rw-r--r--network/node/npm.sh12
3 files changed, 36 insertions, 9 deletions
diff --git a/network/node/node.SlackBuild b/network/node/node.SlackBuild
index 6f97b2b4b5..ec78a79aee 100644
--- a/network/node/node.SlackBuild
+++ b/network/node/node.SlackBuild
@@ -4,7 +4,7 @@
# Written by Audrius Kažukauskas <audrius@neutrino.lt>
PRGNAM=node
-VERSION=${VERSION:-0.4.7}
+VERSION=${VERSION:-0.6.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -46,9 +46,18 @@ cd $PRGNAM-v$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-sed -i "s|share/man|man|" wscript
-sed -i "s|\"lib\"|\"lib$LIBDIRSUFFIX\"|" tools/node-waf
-sed -i "s|/lib|/lib$LIBDIRSUFFIX|" tools/nodejs.pc.in
+# Fix man page path.
+sed -i 's|/share||' wscript
+sed -i '/var manRoot/ s/"share",//' deps/npm/lib/build.js
+
+# Make `npm help' to look for gzipped man pages.
+sed -i 's/\." + num/." + num + ".gz"/' deps/npm/lib/help.js
+
+# Fix libdir for 64-bit.
+sed -i "s|/lib/|/lib${LIBDIRSUFFIX}/|" wscript
+sed -i "s/'lib'/'lib${LIBDIRSUFFIX}'/" \
+ lib/module.js tools/wafadmin/Tools/node_addon.py
+sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" deps/npm/lib/npm.js tools/node-waf
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -62,9 +71,15 @@ make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+find $PKG/usr/man $PKG/usr/lib${LIBDIRSUFFIX}/node_modules/npm/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+# Add bash completion file for npm.
+install -D -m 644 $CWD/npm.sh $PKG/etc/bash_completion.d/npm
+
+# Remove unneeded files.
+find $PKG/usr \( -name '.git*' -o -name '.travis.yml' \) -exec rm -f {} \;
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS ChangeLog LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/network/node/node.info b/network/node/node.info
index ed67dffe36..f5fd07d321 100644
--- a/network/node/node.info
+++ b/network/node/node.info
@@ -1,10 +1,10 @@
PRGNAM="node"
-VERSION="0.4.7"
+VERSION="0.6.6"
HOMEPAGE="http://nodejs.org/"
-DOWNLOAD="http://nodejs.org/dist/node-v0.4.7.tar.gz"
-MD5SUM="7b955c8d5897ab3f3d5c21b7a04abdec"
+DOWNLOAD="http://nodejs.org/dist/v0.6.6/node-v0.6.6.tar.gz"
+MD5SUM="43836ebd6e8e9059c4584e3b5ab50009"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Audrius Kažukauskas"
EMAIL="audrius@neutrino.lt"
-APPROVED="Niels Horn"
+APPROVED="rworkman"
diff --git a/network/node/npm.sh b/network/node/npm.sh
new file mode 100644
index 0000000000..71a1fae403
--- /dev/null
+++ b/network/node/npm.sh
@@ -0,0 +1,12 @@
+# bash completion for npm
+
+_npm_completion () {
+ local si="$IFS"
+ IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
+ COMP_LINE="$COMP_LINE" \
+ COMP_POINT="$COMP_POINT" \
+ npm completion -- "${COMP_WORDS[@]}" \
+ 2>/dev/null)) || return $?
+ IFS="$si"
+}
+complete -F _npm_completion npm