Date: Thursday, May 20, 2021 @ 22:27:38 Author: felixonmars Revision: 939571
archrelease: copy trunk to community-any Added: npm/repos/community-any/PKGBUILD (from rev 939570, npm/trunk/PKGBUILD) Deleted: npm/repos/community-any/PKGBUILD ----------+ PKGBUILD | 126 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 63 insertions(+), 63 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2021-05-20 22:27:18 UTC (rev 939570) +++ PKGBUILD 2021-05-20 22:27:38 UTC (rev 939571) @@ -1,63 +0,0 @@ -# Maintainer: Felix Yan <felixonm...@archlinux.org> - -pkgname=npm -pkgver=7.13.0 -pkgrel=1 -pkgdesc='A package manager for javascript' -arch=('any') -url='https://www.npmjs.com/' -license=('custom:Artistic') -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') -options=('!emptydirs') -source=("$pkgname-$pkgver.tar.gz::https://github.com/npm/cli/archive/v$pkgver.tar.gz") -sha512sums=('aa22c2a0dc1ee6f4d19c2c3da60bc240e41f7ad39d0967a0a4e0b50ea3193de381b15d7f6d45e6fa737b28c90e90ec06d7bb30eaff164620590f69e3237897c4') - -prepare() { - cd cli-$pkgver - mkdir -p node_modules/.bin - ln -sf /usr/bin/marked{,-man} node_modules/.bin/ - - # Use local marked/marked-man - sed -i 's|node bin/npm-cli.js install marked|true |' Makefile - - # Don't build twice - sed -i 's/install: all/install:/' Makefile - - mkdir -p man/man1 -} - -build() { - cd cli-$pkgver - 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 - 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 -} Copied: npm/repos/community-any/PKGBUILD (from rev 939570, npm/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2021-05-20 22:27:38 UTC (rev 939571) @@ -0,0 +1,63 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgname=npm +pkgver=7.14.0 +pkgrel=1 +pkgdesc='A package manager for javascript' +arch=('any') +url='https://www.npmjs.com/' +license=('custom:Artistic') +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') +options=('!emptydirs') +source=("$pkgname-$pkgver.tar.gz::https://github.com/npm/cli/archive/v$pkgver.tar.gz") +sha512sums=('ebb0a7f2dc09f61f64540559f59c80dc2bed492d18a39ae6af360452518ec4ecfe97471fb56cc5439f9de6d51220ba406d63d5ac49371efb9ed30321534bbb90') + +prepare() { + cd cli-$pkgver + mkdir -p node_modules/.bin + ln -sf /usr/bin/marked{,-man} node_modules/.bin/ + + # Use local marked/marked-man + sed -i 's|node bin/npm-cli.js install marked|true |' Makefile + + # Don't build twice + sed -i 's/install: all/install:/' Makefile + + mkdir -p man/man1 +} + +build() { + cd cli-$pkgver + 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 + 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 +}