diff options
author | Mark Wagie | 2022-01-06 16:56:37 -0700 |
---|---|---|
committer | Mark Wagie | 2022-01-06 16:56:37 -0700 |
commit | aa62d9ebbd3766bf1ff7b2e288c1aa3aae6240b4 (patch) | |
tree | f999ab6396ae25bce20fd01005e999e620ee4310 | |
parent | a8dbdad4237b81adf60c9befa151f61726a5021f (diff) | |
download | aur-kmdr.tar.gz |
minor PKGBUILD improvements
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 21 insertions, 22 deletions
@@ -12,4 +12,3 @@ pkgbase = kmdr sha256sums = 5c565ca54002a0d9330f8ec8741af802921e4611fb31241e0adfb9149ea7d16b pkgname = kmdr - @@ -12,30 +12,30 @@ source=("$pkgname-$pkgver.tar.gz::https://github.com/ediardo/kmdr-cli/archive/v$ sha256sums=('5c565ca54002a0d9330f8ec8741af802921e4611fb31241e0adfb9149ea7d16b') package() { - cd "$pkgname-cli-$pkgver" - npm install "$pkgname@latest" \ - --cache "$srcdir/npm-cache" \ - -g \ - --user root \ - --prefix "$pkgdir"/usr + cd "$pkgname-cli-$pkgver" + npm install "$pkgname@latest" \ + --cache "$srcdir/npm-cache" \ + -g \ + --user root \ + --prefix "$pkgdir"/usr - # Non-deterministic race in npm gives 777 permissions to random directories. - # See https://github.com/npm/cli/issues/1103 for details. - find "$pkgdir/usr" -type d -exec chmod 755 {} + + # Non-deterministic race in npm gives 777 permissions to random directories. + # See https://github.com/npm/cli/issues/1103 for details. + find "$pkgdir/usr" -type d -exec chmod 755 {} + - # npm gives ownership of ALL FILES to build user - # https://bugs.archlinux.org/task/63396 - chown -R root:root "$pkgdir" + # npm gives ownership of ALL FILES to build user + # https://bugs.archlinux.org/task/63396 + chown -R root:root "$pkgdir" - # Remove references to $pkgdir - find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d" + # Remove references to $pkgdir + find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d" - # Remove references to $srcdir - local tmppackage="$(mktemp)" - local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json" - jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage" - mv "$tmppackage" "$pkgjson" - chmod 644 "$pkgjson" + # Remove references to $srcdir + local tmppackage="$(mktemp)" + local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json" + jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage" + mv "$tmppackage" "$pkgjson" + chmod 644 "$pkgjson" - install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" + install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" } |