summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Goncharov2021-09-27 16:37:08 +0300
committerKirill Goncharov2021-09-27 16:38:01 +0300
commit113443c276537c59679574f264803b84457d8252 (patch)
tree0869d449a2911f62ddea5a5ddb71d8c01fb7a4f2
parentaccc06d2214d6541978b64b9193d055e78eaf809 (diff)
downloadaur-113443c276537c59679574f264803b84457d8252.tar.gz
Use system chromium binary instead of downloading it
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD9
2 files changed, 8 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 29bb45c64f7..f1121a64768 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,14 @@
pkgbase = mermaid-cli
pkgdesc = Generation of diagram and flowchart from text in a similar manner as markdown (CLI)
pkgver = 8.13.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/mermaid-js/mermaid-cli
arch = any
license = MIT
makedepends = npm
+ makedepends = chromium
depends = nodejs
+ depends = chromium
noextract = mermaid-cli-8.13.0.tgz
source = http://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-8.13.0.tgz
sha256sums = 4f96aa080049f68992ea51b616ef6a1779a3bc75a4b18c1aeb5ac0d46b51a7de
diff --git a/PKGBUILD b/PKGBUILD
index ae7d60985eb..9fc46c3b781 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,13 +2,13 @@
pkgname=mermaid-cli
pkgver=8.13.0
-pkgrel=1
+pkgrel=2
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')
-depends=('nodejs')
-makedepends=('npm')
+depends=('nodejs' 'chromium')
+makedepends=('npm' 'chromium')
_npmscope=@mermaid-js
_npmname=mermaid-cli
_npmver=$pkgver
@@ -17,7 +17,8 @@ sha256sums=('4f96aa080049f68992ea51b616ef6a1779a3bc75a4b18c1aeb5ac0d46b51a7de')
noextract=("${_npmname}-${_npmver}.tgz")
package() {
- npm install --global --production --prefix "${pkgdir}/usr" "${_npmname}-${_npmver}.tgz"
+ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install --global --production --prefix "${pkgdir}/usr" "${_npmname}-${_npmver}.tgz"
+ sed -i "s#let puppeteerConfig = {}#let puppeteerConfig = { executablePath: '$(which chromium)' }#g" "${pkgdir}/usr/lib/node_modules/@mermaid-js/mermaid-cli/index.bundle.js"
# -> https://wiki.archlinux.org/index.php/Node.js_package_guidelines
# Non-deterministic race in npm gives 777 permissions to random directories.