[arch-commits] Commit in grunt-cli/trunk (PKGBUILD grunt-cli.install)

Eli Schwartz eschwartz at archlinux.org
Mon Aug 20 15:02:56 UTC 2018


    Date: Monday, August 20, 2018 @ 15:02:55
  Author: eschwartz
Revision: 372877

upgpkg: grunt-cli 1.3.1-2

rm old workarounds for permissions
rm old provides/replaces
fix broken license symlink
install shell completions

Modified:
  grunt-cli/trunk/PKGBUILD
Deleted:
  grunt-cli/trunk/grunt-cli.install

-------------------+
 PKGBUILD          |   26 +++++++++++++++-----------
 grunt-cli.install |   10 ----------
 2 files changed, 15 insertions(+), 21 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-08-20 14:09:22 UTC (rev 372876)
+++ PKGBUILD	2018-08-20 15:02:55 UTC (rev 372877)
@@ -6,27 +6,31 @@
 
 pkgname=grunt-cli
 pkgver=1.3.1
-pkgrel=1
+pkgrel=2
 pkgdesc="The grunt command line interface."
 arch=('any')
-url="http://gruntjs.com/"
+url="https://gruntjs.com/"
 license=('MIT')
 depends=('nodejs')
 makedepends=('npm')
-provides=('nodejs-grunt-cli')
-conflicts=('nodejs-grunt-cli')
-replaces=('nodejs-grunt-cli')
-install=${pkgname}.install
-source=("https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz")
+source=("https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz"
+        "$pkgname-$pkgver.LICENSE::https://github.com/gruntjs/grunt-cli/raw/v$pkgver/LICENSE-MIT")
 noextract=($pkgname-$pkgver.tgz)
-sha512sums=('530051bbf4290230dce770d12c49328a515d2f4cde9e9c6ef9f75d4c896c17f289a9d35c1da426bf2bb55b77037ac67daeaa9974a2b903cf900c8c8b5045a865')
+sha512sums=('530051bbf4290230dce770d12c49328a515d2f4cde9e9c6ef9f75d4c896c17f289a9d35c1da426bf2bb55b77037ac67daeaa9974a2b903cf900c8c8b5045a865'
+            'e10d81276cacf81f58deca8411a4d3ab0d5213ef4829d755ea0056c0da5ccad600e3b172cdc47949b07b575cf03773f64d9e46b644f99764a051f7f3bca5f903')
 
 package() {
   npm install -g --user root --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
 
-  # Why 777? :/
+  # 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"
 
-  mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
-  ln -s "../../../lib/node_modules/$pkgname/LICENSE-MIT" "$pkgdir/usr/share/licenses/$pkgname/"
+  # install completions properly
+ install -Dm644 "$pkgdir"/usr/lib/node_modules/grunt-cli/completion/bash \
+   "$pkgdir"/usr/share/bash-completion/completions/grunt-cli
+ install -Dm644 "$pkgdir"/usr/lib/node_modules/grunt-cli/completion/zsh \
+   "$pkgdir"/usr/share/zsh/site-functions/_grunt-cli
+
+  install -Dm644 "$srcdir"/$pkgname-$pkgver.LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }

Deleted: grunt-cli.install
===================================================================
--- grunt-cli.install	2018-08-20 14:09:22 UTC (rev 372876)
+++ grunt-cli.install	2018-08-20 15:02:55 UTC (rev 372877)
@@ -1,10 +0,0 @@
-post_install() {
-  # fixup permissions
-  chmod 755 /usr/lib/node_modules \
-	  /usr/lib/node_modules/grunt-cli/node_modules \
-	  /usr/lib/node_modules/grunt-cli/node_modules/.bin
-}
-
-post_upgrade() {
-  post_install
-}



More information about the arch-commits mailing list