mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-27 23:44:04 +00:00
community/npm to 7.6.0-1
This commit is contained in:
parent
b4d193732c
commit
0299051cce
1 changed files with 10 additions and 8 deletions
|
@ -1,10 +1,11 @@
|
|||
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - makedepend on libpng - required to build pngquant from source during build
|
||||
# - skip documentation build, breaks on 32-bit
|
||||
# - comment make in build, comment man mv in package
|
||||
|
||||
pkgname=npm
|
||||
pkgver=6.14.11
|
||||
pkgver=7.6.0
|
||||
pkgrel=1
|
||||
pkgdesc='A package manager for javascript'
|
||||
arch=('any')
|
||||
|
@ -14,10 +15,10 @@ depends=('nodejs' 'node-gyp' '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' 'marked' 'marked-man' 'procps-ng' 'python' 'libpng')
|
||||
makedepends=('libgl' 'libxi' 'marked' 'marked-man' 'procps-ng' 'python')
|
||||
options=('!emptydirs')
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/npm/cli/archive/v$pkgver.tar.gz")
|
||||
sha512sums=('ad8e6c72c82f1b982fc5aaafcca96d40e26c1e8b6b09d41de68118574019bd6a9253acddf0c91384fa6c4c8d96a5ffac0a3c8e497f35b29e2e99f35c1bc21644')
|
||||
sha512sums=('de25be5485ac5467dc15514b986ffe0224b0f2dfc6d5be6bad34b11a5277b08fe6104243d9ef94c3cefb01bcfd6fb4432b1bbf268ad73855833da5b2cbca5463')
|
||||
|
||||
prepare() {
|
||||
cd cli-$pkgver
|
||||
|
@ -35,12 +36,12 @@ prepare() {
|
|||
|
||||
build() {
|
||||
cd cli-$pkgver
|
||||
NODE_PATH=/usr/lib/node_modules make
|
||||
#NODE_PATH=/usr/lib/node_modules make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd cli-$pkgver
|
||||
make NPMOPTS="--prefix=\"$pkgdir/usr\"" install
|
||||
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.
|
||||
|
@ -54,12 +55,13 @@ package() {
|
|||
_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 \
|
||||
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 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue