summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorquest2023-10-18 14:31:56 -1000
committerquest2023-10-18 14:31:56 -1000
commit80559c17a48a6fe478d97658907f6ee9f5358f66 (patch)
tree17b64d703fea3c98e086f7c99f0714e4938969ba
downloadaur-cashc.tar.gz
Added cashc
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD30
3 files changed, 48 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..524d26579122
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = cashc
+ pkgdesc = CashScript compiler for Bitcoin Cash.
+ pkgver = 0.9.1
+ pkgrel = 1
+ url = https://github.com/CashScript/cashscript
+ arch = x86_64
+ license = MIT
+ makedepends = npm
+ depends = nodejs
+ noextract = cashc-0.9.1.tgz
+ options = !strip
+ source = cashc-0.9.1.tgz::https://registry.npmjs.org/cashc/-/cashc-0.9.1.tgz
+ sha256sums = 23a2dcaa3bb83e50128f4cf8b2d24235ea0739e56a16309d44a4f06e88687a21
+
+pkgname = cashc
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4ca33e0cdf50
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+src
+pkg
+cashc* \ No newline at end of file
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"
+}