summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitsunyan2018-01-07 20:23:10 +0300
committerkitsunyan2018-01-07 20:23:10 +0300
commitb8896ba275402e4a42117a3119bb9cb3bf2d048e (patch)
tree85cbce01b7a4ed022e75b7f3aed15439f9fef04d
parent212ea49b12769f187bf06e4464f80b6a012317fb (diff)
downloadaur-b8896ba275402e4a42117a3119bb9cb3bf2d048e.tar.gz
Install dependencies using npm
-rw-r--r--PKGBUILD13
1 files changed, 10 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4bbb680c3b7..50eddf88839 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,6 +9,7 @@ url='https://github.com/jgraph/drawio'
license=('Apache')
depends=(electron gconf libnotify)
conflicts=(drawio-desktop-bin)
+makedepends=(npm)
source=("drawio-desktop-$pkgver.zip::https://github.com/jgraph/drawio/releases/download/v$pkgver/draw.war")
noextract=("drawio-desktop-$pkgver.zip")
sha256sums=('2216a90a7ad8fadd684641a756caaea0297bf2dd91ea0182e04247276dff0661')
@@ -21,9 +22,15 @@ prepare() {
bsdtar -xf "../drawio-desktop-$pkgver.zip" -C .
rm -rf "META-INF" "WEB-INF"
- # disable logger
- sed -e "/require('electron-log')/d" \
- -i 'electron.js'
+ # remove electron from dependencies
+ sed '/"electron": ".*"/d' -i 'package.json'
+}
+
+build() {
+ cd "$srcdir/drawio-$pkgver"
+
+ npm install --cache ../npm-cache
+ rm -f 'package-lock.json'
}
package() {