



















The current PKGBUILD does not work, due to a potentially misnamed source.
Sorry about that. I tested it before proposing the patch but
==> Retrieving sources...
-> Found resume-cli-3.0.4.tgz
I think it did not re-download it since the archive was already there, so I did not spot the error.
Could you also bump the pkgrel version? yay is still trying to grab the broken PKGBUILD for me since the version hasn't changed.
Wow, thanks for sorting that out so fast. It appears to be working on my end too. Ignoring the first 7 characters with ${pkgname:7} is cool, I've learned something new!
Sorry about that. It's been fixed and actually tested before pushing this time.
The current PKGBUILD does not work, due to a potentially misnamed source. The source should point to https://registry.npmjs.org/resume-cli/-/resume-cli-3.0.4.tgz .
I noticed in the previous version it points to the correct source as you explicitly make a variable that is the npm package name which is called in source (source=("https://registry.npmjs.org/${_npmname}/-/${_npmname}-${_npmver}.tgz")) though you are calling source=("https://registry.npmjs.org/${pkgname}/-/${pkgname}-${pkgver}.tgz") now so it is looking for a package called nodejs-resume-cli.
First comment here so apologies for any formatting errors.
I'll suggest the following patch to update the version and remove srcdir ref as indicated by the Node.js arch package guidelines.
From 77ffc12311a952b984b2d5f88fb04d5397ab6f07 Mon Sep 17 00:00:00 2001
From: Max Gautier <mg+archlinux@max.gautier.name>
Date: Sun, 7 Feb 2021 11:34:18 +0100
Subject: [PATCH] Version + remove scrdir ref
---
PKGBUILD | 45 ++++++++++++++++++++++++++++++---------------
1 file changed, 30 insertions(+), 15 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD
index 0c63fb8..9f1f20b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,38 @@
-_npmname=resume-cli
-_npmver=1.2.7
-pkgname=nodejs-resume-cli
-pkgver="${_npmver}"
+pkgname=resume-cli
+pkgver=3.0.4
pkgrel=1
pkgdesc="The command line tool for JSON Resume"
arch=(any)
url="https://github.com/jsonresume/resume-cli"
license=('MIT')
-depends=('nodejs' 'npm')
-source=("https://registry.npmjs.org/${_npmname}/-/${_npmname}-${_npmver}.tgz")
-noextract=(${_npmname}-${_npmver}.tgz)
-sha256sums=('a84f2739ca1d2ee5d9ca113ae9a9a7ee9d90808f9bffbade8e72c12eb2552958')
+depends=('nodejs')
+makedepends=('npm' 'jq')
+source=("https://registry.npmjs.org/${pkgname}/-/${pkgname}-${pkgver}.tgz")
+noextract=(${pkgname}-${pkgver}.tgz)
+sha512sums=('1274d5e87a343cd2e40279034d57f771cfc8580a1f3c71df03b0ac080edc12126ad939b4540ab9120d4c2cd86aa2a47cb44ee56b2072a64090997c9e6f56c8ea')
package() {
- cd ${srcdir}
- local _npmdir="${pkgdir}/usr/lib/node_modules/"
- mkdir -p ${_npmdir}
- cd ${_npmdir}
- npm install -g --prefix "${pkgdir}/usr" ${_npmname}@${_npmver}
-}
+ npm install -g --user root --prefix "$pkgdir/usr" "$srcdir/$pkgname-$pkgver.tgz"
+
+
+ # 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 {} +
-# vim:set ts=2 sw=2 et:
+ # Remove references to $pkgdir
+ find "$pkgdir" -type f -name package.json -exec 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"
+
+ find "$pkgdir" -type f -name package.json | while read pkgjson; do
+ local tmppackage="$(mktemp)"
+ jq 'del(.man)' "$pkgjson" > "$tmppackage"
+ mv "$tmppackage" "$pkgjson"
+ chmod 644 "$pkgjson"
+ done
+}
--
2.30.0
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
Pkgrel has been bumped, sorry.