[arch-commits] Commit in npm/repos (2 files)

Felix Yan fyan at archlinux.org
Wed Nov 25 02:22:28 UTC 2015


    Date: Wednesday, November 25, 2015 @ 03:22:28
  Author: fyan
Revision: 147734

archrelease: copy trunk to community-testing-any

Added:
  npm/repos/community-testing-any/
  npm/repos/community-testing-any/PKGBUILD
    (from rev 147733, npm/trunk/PKGBUILD)

----------+
 PKGBUILD |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

Copied: npm/repos/community-testing-any/PKGBUILD (from rev 147733, npm/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2015-11-25 02:22:28 UTC (rev 147734)
@@ -0,0 +1,48 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=npm
+pkgver=3.5.0
+pkgrel=1
+pkgdesc='A package manager for javascript'
+arch=('any')
+url='https://www.npmjs.com/'
+license=('custom:Artistic')
+depends=('nodejs')
+provides=('nodejs-node-gyp')
+makedepends=('git' 'procps-ng')
+optdepends=('python2: for node-gyp')
+options=('!emptydirs')
+source=("git+https://github.com/npm/npm.git#tag=v$pkgver")
+md5sums=('SKIP')
+
+build() {
+  cd npm
+  make
+}
+
+package() {
+  cd npm
+  make NPMOPTS="--prefix=\"$pkgdir/usr\"" install
+
+  # Why 777? :/
+  chmod -R u=rwX,go=rX "$pkgdir"
+  
+  # Fix files owned by nobody:
+  chown -R root "$pkgdir/usr/lib/node_modules" 
+
+  # Fix wrong symlinks
+  for _dir in man1 man5 man7; do
+    rm -f "$pkgdir"/usr/share/man/$_dir/*
+    cd "$pkgdir"/usr/lib/node_modules/npm/man/$_dir
+    for _file in *; do
+      ln -s /usr/lib/node_modules/npm/man/$_dir/$_file "$pkgdir"/usr/share/man/$_dir/
+    done
+  done
+  
+  # Provide node-gyp executable
+  cp "$pkgdir"/usr/lib/node_modules/npm/bin/node-gyp-bin/node-gyp "$pkgdir"/usr/bin/node-gyp
+  sed -i 's|"`dirname "$0"`/../../|"`dirname "$0"`/../lib/node_modules/npm/|' "$pkgdir"/usr/bin/node-gyp
+  
+  install -Dm644 "$srcdir/npm/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}



More information about the arch-commits mailing list