summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Goncharov2020-06-11 13:17:04 +0300
committerKirill Goncharov2020-06-11 13:36:16 +0300
commitb8fe23e7f07b521f53d05abdf67d30498d072ba3 (patch)
tree8f225d9c38a0b2a60f4e82b95e15f7cd63b97385
downloadaur-b8fe23e7f07b521f53d05abdf67d30498d072ba3.tar.gz
Initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD28
3 files changed, 47 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..64fe5561e40
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = mermaid-cli
+ pkgdesc = Generation of diagram and flowchart from text in a similar manner as markdown (CLI)
+ pkgver = 8.5.1
+ pkgrel = 1
+ url = https://github.com/mermaid-js/mermaid-cli
+ arch = any
+ license = MIT
+ makedepends = nodejs
+ makedepends = npm
+ noextract = ${_npmname}-${_npmver}.tgz
+ source = http://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-8.5.1-2.tgz
+ sha256sums = d5152bedbf37068d1e6a35e3c4317a31d9d223b77836312da1b992ba3918fd91
+
+pkgname = mermaid-cli
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..410a5e7255d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+src/
+pkg/
+*.tgz
+*.tar.xz \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ca542275e7b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Kirill Goncharov <kdgoncharov at gmail dot com>
+
+pkgname=mermaid-cli
+pkgver=8.5.1
+pkgrel=1
+pkgdesc='Generation of diagram and flowchart from text in a similar manner as markdown (CLI)'
+arch=('any')
+url='https://github.com/mermaid-js/mermaid-cli'
+license=('MIT')
+makedepends=('nodejs' 'npm')
+_npmscope=@mermaid-js
+_npmname=mermaid-cli
+_npmver=8.5.1-2
+source=("http://registry.npmjs.org/${_npmscope}/${_npmname}/-/${_npmname}-${_npmver}.tgz")
+sha256sums=('d5152bedbf37068d1e6a35e3c4317a31d9d223b77836312da1b992ba3918fd91')
+noextract=('${_npmname}-${_npmver}.tgz')
+
+package() {
+ npm install --global --production --user root --prefix "${pkgdir}/usr" "${_npmname}-${_npmver}.tgz"
+
+ # -> 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"
+}