[arch-commits] Commit in npm/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Tue Apr 24 17:09:44 UTC 2018
Date: Tuesday, April 24, 2018 @ 17:09:44
Author: felixonmars
Revision: 317589
archrelease: copy trunk to community-testing-any
Added:
npm/repos/community-testing-any/
npm/repos/community-testing-any/PKGBUILD
(from rev 317587, npm/trunk/PKGBUILD)
----------+
PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
Copied: npm/repos/community-testing-any/PKGBUILD (from rev 317587, npm/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2018-04-24 17:09:44 UTC (rev 317589)
@@ -0,0 +1,47 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=npm
+pkgver=6.0.0
+pkgrel=1
+pkgdesc='A package manager for javascript'
+arch=('any')
+url='https://www.npmjs.com/'
+license=('custom:Artistic')
+depends=('nodejs' 'node-gyp' 'semver')
+makedepends=('procps-ng' 'marked-man')
+options=('!emptydirs')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/npm/npm/archive/v$pkgver.tar.gz")
+sha512sums=('7c5288a268373fa52d5b3d55bd5d40f71459cc2e2f5610b3ecbb61323cbd8b82d6e7ebb5fbea3449de22d4002329895ae3d99f6aceb62dae46875b4669e5cbbd')
+
+prepare() {
+ cd npm-$pkgver
+ ln -sf /usr/bin/marked{,-man} node_modules/.bin/
+}
+
+build() {
+ cd npm-$pkgver
+ make
+}
+
+package() {
+ cd npm-$pkgver
+ make NPMOPTS="--prefix=\"$pkgdir/usr\"" install
+
+ # Non-deterministic race in npm gives 777 permissions to random directories.
+ # See https://github.com/npm/npm/issues/9359 for details.
+ chmod -R u=rwX,go=rX "$pkgdir"
+
+ # Experimental dedup
+ _npmdir="$pkgdir"/usr/lib/node_modules/$pkgname
+ rm -r "$_npmdir"/node_modules/{,.bin/}semver
+ rm -r "$_npmdir"/node_modules/{,.bin/}node-gyp
+ sed -i '/node-gyp.js/c\ exec /usr/bin/node-gyp "$@"' \
+ "$_npmdir"/node_modules/npm-lifecycle/node-gyp-bin/node-gyp \
+ "$_npmdir"/bin/node-gyp-bin/node-gyp
+
+ install -dm755 "$pkgdir"/usr/share/bash-completion/completions
+ node "$srcdir"/npm-$pkgver/bin/npm-cli.js completion > "$pkgdir"/usr/share/bash-completion/completions/npm
+
+ install -Dm644 "$srcdir"/npm-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
More information about the arch-commits
mailing list