diff options
author | rafasc | 2018-03-08 20:24:19 +0000 |
---|---|---|
committer | rafasc | 2018-03-08 20:24:19 +0000 |
commit | 6aee0935e8b73b41e1ba6746706b6be2528bfa2a (patch) | |
tree | 584aff62564c36518c01b0375dff3d25102ed10c | |
download | aur-6aee0935e8b73b41e1ba6746706b6be2528bfa2a.tar.gz |
initial upload: nodejs-google-clasp 1.1.5-1
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | nodejs-google-clasp.install | 17 |
3 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0f756c2b1465 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = nodejs-google-clasp + pkgdesc = Develop Apps Script Projects locally + pkgver = 1.1.5 + pkgrel = 1 + url = https://github.com/google/clasp + install = nodejs-google-clasp.install + arch = any + license = Apache + makedepends = npm + depends = nodejs + optdepends = typescript: autocompletion and linting + noextract = clasp-1.1.5.tgz + source = https://registry.npmjs.org/@google/clasp/-/clasp-1.1.5.tgz + sha256sums = 7ac6a02c22554eed516505d4304b092c140df0e2742b339ba1e055a5f9eff45b + +pkgname = nodejs-google-clasp + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..88be138a484d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Rafael Ascensão <rafa dot almas at gmail dot com> + +_npmname='@google/clasp' +pkgname="nodejs-google-clasp" +pkgver=1.1.5 +pkgrel=1 +pkgdesc='Develop Apps Script Projects locally' +arch=('any') +url='https://github.com/google/clasp' +license=('Apache') +depends=('nodejs') +makedepends=('npm') +optdepends=('typescript: autocompletion and linting') +install="$pkgname".install +source=("https://registry.npmjs.org/$_npmname/-/${_npmname##*/}-$pkgver.tgz") +noextract=("${_npmname##*/}-$pkgver.tgz") +sha256sums=('7ac6a02c22554eed516505d4304b092c140df0e2742b339ba1e055a5f9eff45b') + +package() { + cd $srcdir + npm install -g --user root --prefix "$pkgdir"/usr "${_npmname##*/}-$pkgver.tgz" + + # 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 {} + + + rmdir "${pkgdir}"/usr/etc + # Rename command because clasp from [community] has /usr/bin/clasp + mv "${pkgdir}"/usr/bin/{,g}clasp +} diff --git a/nodejs-google-clasp.install b/nodejs-google-clasp.install new file mode 100644 index 000000000000..a2e20cf5cede --- /dev/null +++ b/nodejs-google-clasp.install @@ -0,0 +1,17 @@ +# Colored makepkg-like functions +note() { + printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n" +} + +all_off="$(tput sgr0)" +bold="${all_off}$(tput bold)" +blue="${bold}$(tput setaf 4)" +yellow="${bold}$(tput setaf 3)" + +post_install() { + note "The command is called: 'gclasp'" +} + +post_upgrade() { + post_install +} |