diff options
Diffstat (limited to 'network/node/node.SlackBuild')
-rw-r--r-- | network/node/node.SlackBuild | 25 |
1 files changed, 20 insertions, 5 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 |