1
0
mirror of https://github.com/bertptrs/aur.git synced 2025-12-27 21:40:31 +01:00

upgpkg: nodejs-node-pre-gyp 1.0.6-1

upstream release

upgpkg: nodejs-node-pre-gyp 1.0.6-1

Upstream changed package names on npm. This required some changes. For
more details, see [1].

[1]: https://github.com/mapbox/node-pre-gyp#special-note-on-previous-package
This commit is contained in:
2021-10-24 15:18:58 +02:00
parent 8c04d95ca1
commit 553f482166
2 changed files with 11 additions and 12 deletions

View File

@@ -1,17 +1,17 @@
# Maintainer: Bert Peters <bert@bertptrs.nl>
_npmname=node-pre-gyp
pkgname=nodejs-node-pre-gyp
pkgver=0.17.0
pkgrel=2
pkgver=1.0.6
pkgrel=1
pkgdesc="Node.js tool for easy binary deployment of C++ addons "
arch=('any')
url="https://github.com/mapbox/node-pre-gyp"
license=('BSD')
depends=('nodejs')
makedepends=('npm' 'jq')
source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
source=("https://registry.npmjs.org/@mapbox/$_npmname/-/$_npmname-$pkgver.tgz")
noextract=("$_npmname-$pkgver.tgz")
sha1sums=('5af3f7b4c3848b5ed00edc3d298ff836daae5f1d')
sha1sums=('f859d601a210537e27530f363028cde56e0cf962')
package() {
npm install -g --prefix "$pkgdir/usr" "$_npmname-$pkgver.tgz"
@@ -21,7 +21,7 @@ package() {
# Remove references to $srcdir
local tmppackage="$(mktemp)"
local pkgjson="$pkgdir/usr/lib/node_modules/$_npmname/package.json"
local pkgjson="$pkgdir/usr/lib/node_modules/@mapbox/$_npmname/package.json"
jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
mv "$tmppackage" "$pkgjson"
chmod 644 "$pkgjson"
@@ -31,5 +31,5 @@ package() {
# Install LICENSE in a more findable spot.
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" \
"$pkgdir/usr/lib/node_modules/$_npmname/LICENSE"
"$pkgdir/usr/lib/node_modules/@mapbox/$_npmname/LICENSE"
}