diff options
author | Rafael Ascensão | 2019-09-13 22:37:55 +0100 |
---|---|---|
committer | Rafael Ascensão | 2019-09-13 22:37:55 +0100 |
commit | 90e621d62b8646306c5aa8bdd6acfe791dea068a (patch) | |
tree | 1b249540544af7bcacf2a288107939faecc6a679 /PKGBUILD | |
parent | dc54c6335deff92d36375648e54b07d80d9f8d5d (diff) | |
download | aur-nodejs-google-clasp.tar.gz |
upgpkg: nodejs-google-clasp 2.3.0-1
upstream release
Due to npm permission issues, install in build and copy files in package.
related bug report: https://bugs.archlinux.org/task/63396
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -2,7 +2,7 @@ _npmname='@google/clasp' pkgname="nodejs-google-clasp" -pkgver=2.2.1 +pkgver=2.3.0 pkgrel=1 pkgdesc='Develop Apps Script Projects locally' arch=('any') @@ -13,15 +13,19 @@ makedepends=('npm') optdepends=('typescript: autocompletion and linting') source=("https://registry.npmjs.org/$_npmname/-/${_npmname##*/}-$pkgver.tgz") noextract=("${_npmname##*/}-$pkgver.tgz") -sha256sums=('971a7eca0e17599e4659e3344b1e8c9f2343cb181d7843ea8a6f9a42249c2809') +sha256sums=('b2dd6db7f3e071f09e99d8f4cad0843d9044d53e82bab147a8ad483da0347cfb') -package() { - cd $srcdir - npm install -g --user root --prefix "$pkgdir"/usr "${_npmname##*/}-$pkgver.tgz" +build() { + # Due to npm permission issues, install in build and copy files in package. + # related bug report: https://bugs.archlinux.org/task/63396 + npm install -g --prefix "${srcdir}"/usr "${_npmname##*/}-$pkgver.tgz" +} +package() { + cp -R usr "${pkgdir}" # Non-deterministic race in npm gives 777 permissions to random directories. # See https://github.com/npm/npm/issues/9359 for details. - find "${pkgdir}"/usr -type d -exec chmod 755 {} + + chmod -R u=rwX,go=rX "${pkgdir}" # Rename command because clasp from [community] has /usr/bin/clasp mv "${pkgdir}"/usr/bin/{,g}clasp |