[arch-commits] Commit in npm/repos/community-any (PKGBUILD PKGBUILD)
Felix Yan
felixonmars at gemini.archlinux.org
Wed Aug 3 17:17:14 UTC 2022
Date: Wednesday, August 3, 2022 @ 17:17:13
Author: felixonmars
Revision: 1260051
archrelease: copy trunk to community-any
Added:
npm/repos/community-any/PKGBUILD
(from rev 1260050, npm/trunk/PKGBUILD)
Deleted:
npm/repos/community-any/PKGBUILD
----------+
PKGBUILD | 116 ++++++++++++++++++++++++++++++-------------------------------
1 file changed, 58 insertions(+), 58 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-08-03 17:16:59 UTC (rev 1260050)
+++ PKGBUILD 2022-08-03 17:17:13 UTC (rev 1260051)
@@ -1,58 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgname=npm
-pkgver=8.15.1
-pkgrel=1
-pkgdesc='A package manager for javascript'
-arch=('any')
-url='https://www.npmjs.com/'
-license=('custom:Artistic')
-depends=('nodejs' 'node-gyp' 'nodejs-nopt' 'semver')
-# libgl: TODO
-# libvips: for sharp (doc build) (disabled as current version of gatsby imports a broken sharp)
-# libxi: for cwebp (doc build)
-makedepends=('libgl' 'libxi' 'procps-ng' 'python')
-options=('!emptydirs')
-source=("https://github.com/npm/cli/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
-sha512sums=('3829bd779343046af5146e87df6d5cd0bb871ea0b12bba5138bc2da60706d3d968678844a6f0612887aefb0a9ff9f82a71e22f4ebe8c83350d089073db918e78')
-
-prepare() {
- cd cli-$pkgver
- # 'deps' was added as a dep for many Makefile targets since 8.6 but it's not easy to fix.
- # Let's skip and do it ourselves instead.
- sed -i 's|node bin/npm-cli.js run resetdeps|true|' Makefile
-}
-
-build() {
- cd cli-$pkgver
- node . i --ignore-scripts --no-audit --no-fund
- NODE_PATH=/usr/lib/node_modules make
-}
-
-package() {
- cd cli-$pkgver
- node bin/npm-cli.js install -g -f --prefix="$pkgdir/usr" $(node bin/npm-cli.js pack | tail -1)
-
- # 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"
-
- # npm installs package.json owned by build user
- # https://bugs.archlinux.org/task/63396
- chown -R root:root "$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
- rm -r "$_npmdir"/node_modules/{,.bin/}nopt
- sed -i 's|../../node_modules/node-gyp/bin/node-gyp.js|../../../node-gyp/bin/node-gyp.js|' \
- "$_npmdir"/bin/node-gyp-bin/node-gyp
-
- install -dm755 "$pkgdir"/usr/share/bash-completion/completions
- node "$srcdir"/cli-$pkgver/bin/npm-cli.js completion > "$pkgdir"/usr/share/bash-completion/completions/npm
-
- mv "$pkgdir"/usr/lib/node_modules/npm/man "$pkgdir"/usr/share/
-
- install -Dm644 "$srcdir"/cli-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
-}
Copied: npm/repos/community-any/PKGBUILD (from rev 1260050, npm/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-08-03 17:17:13 UTC (rev 1260051)
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=npm
+pkgver=8.16.0
+pkgrel=1
+pkgdesc='A package manager for javascript'
+arch=('any')
+url='https://www.npmjs.com/'
+license=('custom:Artistic')
+depends=('nodejs' 'node-gyp' 'nodejs-nopt' 'semver')
+# libgl: TODO
+# libvips: for sharp (doc build) (disabled as current version of gatsby imports a broken sharp)
+# libxi: for cwebp (doc build)
+makedepends=('libgl' 'libxi' 'procps-ng' 'python')
+options=('!emptydirs')
+source=("https://github.com/npm/cli/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
+sha512sums=('853a2a7a02a95878f476176ddff1ed6104a7370b3ca5e7559fc0f8a9957806ffc75b99162ff7f20e89e7c4fa9f765906a0474afc8fa9682e2823841bafb499dd')
+
+prepare() {
+ cd cli-$pkgver
+ # 'deps' was added as a dep for many Makefile targets since 8.6 but it's not easy to fix.
+ # Let's skip and do it ourselves instead.
+ sed -i 's|node bin/npm-cli.js run resetdeps|true|' Makefile
+}
+
+build() {
+ cd cli-$pkgver
+ node . i --ignore-scripts --no-audit --no-fund
+ NODE_PATH=/usr/lib/node_modules make
+}
+
+package() {
+ cd cli-$pkgver
+ node bin/npm-cli.js install -g -f --prefix="$pkgdir/usr" $(node bin/npm-cli.js pack | tail -1)
+
+ # 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"
+
+ # npm installs package.json owned by build user
+ # https://bugs.archlinux.org/task/63396
+ chown -R root:root "$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
+ rm -r "$_npmdir"/node_modules/{,.bin/}nopt
+ sed -i 's|../../node_modules/node-gyp/bin/node-gyp.js|../../../node-gyp/bin/node-gyp.js|' \
+ "$_npmdir"/bin/node-gyp-bin/node-gyp
+
+ install -dm755 "$pkgdir"/usr/share/bash-completion/completions
+ node "$srcdir"/cli-$pkgver/bin/npm-cli.js completion > "$pkgdir"/usr/share/bash-completion/completions/npm
+
+ mv "$pkgdir"/usr/lib/node_modules/npm/man "$pkgdir"/usr/share/
+
+ install -Dm644 "$srcdir"/cli-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}
More information about the arch-commits
mailing list