diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ceb71d081cdb --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: quest <quest at mac dot com> + +pkgname=cashc +pkgver=0.9.1 +pkgrel=1 +pkgdesc='CashScript compiler for Bitcoin Cash.' +url='https://github.com/CashScript/cashscript' +arch=('x86_64') +options=(!strip) +license=('MIT') +depends=('nodejs') +makedepends=('npm') +noextract=("$pkgname-$pkgver.tgz") +source=("$pkgname-$pkgver.tgz::https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz") +sha256sums=('23a2dcaa3bb83e50128f4cf8b2d24235ea0739e56a16309d44a4f06e88687a21') + +package() { + npm install -g --omit="dev" --prefix "$pkgdir/usr" --cache "$srcdir/npm-cache" "$pkgname-$pkgver.tgz" + tar -xf "${pkgname}-${pkgver}.tgz" package/LICENSE + install -Dm644 package/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + # -> https://wiki.archlinux.org/index.php/Node.js_package_guidelines + # 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 {} + + + # npm gives ownership of ALL FILES to build user + # https://bugs.archlinux.org/task/63396 + chown -R root:root "$pkgdir" +} |