summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Birks2019-05-15 09:12:13 -0400
committerDavid Birks2019-05-15 09:12:13 -0400
commit9dd33583c57f622e89939da2078d62cc69c88b1a (patch)
tree74e60cc0071a6b805b2d051ab4e401be94bcecb3
parentf1ccf610450edac223454851e9c236b04d55560d (diff)
downloadaur-9dd33583c57f622e89939da2078d62cc69c88b1a.tar.gz
Change to use system electron
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD33
-rw-r--r--marktext.sh2
3 files changed, 28 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3e8566a2c2a..e02f7418840 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,23 @@
pkgbase = marktext
pkgdesc = A simple and elegant open-source markdown editor that focused on speed and usability
pkgver = 0.14.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/marktext/marktext
arch = x86_64
license = MIT
+ makedepends = nodejs
makedepends = yarn
- depends = gtk3
- depends = libxss
- depends = nss
+ makedepends = npm
+ makedepends = python2
+ makedepends = libxkbfile
+ makedepends = git
+ depends = electron
conflicts = marktext-bin
conflicts = marktext-git
source = marktext-0.14.0.tar.gz::http://github.com/marktext/marktext/archive/v0.14.0.tar.gz
+ source = marktext.sh
sha512sums = 11249a2b350a973dd4e35c6f1bedf61415c6e49e22f8e344a4e3f942244cfea5d587adfe7f472e26696ab7e91fc5f17337e6de5db32de2ced964dadd5907c003
+ sha512sums = 8927cea6815420206982263d80fa54bbcfcc37623008b6a2f25d16782cfdff70ef44c3dbc142e2c45b474df52f216e7d58cf556a525df0683bc447481ab7b27d
pkgname = marktext
diff --git a/PKGBUILD b/PKGBUILD
index c8953553b8e..48a00c7296b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,34 +2,35 @@
pkgname=marktext
pkgver=0.14.0
-pkgrel=1
+pkgrel=2
pkgdesc='A simple and elegant open-source markdown editor that focused on speed and usability'
arch=('x86_64')
url='https://github.com/marktext/marktext'
license=('MIT')
conflicts=('marktext-bin' 'marktext-git')
-depends=('gtk3' 'libxss' 'nss')
-makedepends=('yarn')
-source=("$pkgname-$pkgver.tar.gz::http://github.com/marktext/marktext/archive/v$pkgver.tar.gz")
-sha512sums=('11249a2b350a973dd4e35c6f1bedf61415c6e49e22f8e344a4e3f942244cfea5d587adfe7f472e26696ab7e91fc5f17337e6de5db32de2ced964dadd5907c003')
+depends=('electron')
+makedepends=('nodejs' 'yarn' 'npm' 'python2' 'libxkbfile' 'git')
+source=("$pkgname-$pkgver.tar.gz::http://github.com/marktext/marktext/archive/v$pkgver.tar.gz"
+ 'marktext.sh')
+sha512sums=('11249a2b350a973dd4e35c6f1bedf61415c6e49e22f8e344a4e3f942244cfea5d587adfe7f472e26696ab7e91fc5f17337e6de5db32de2ced964dadd5907c003'
+ '8927cea6815420206982263d80fa54bbcfcc37623008b6a2f25d16782cfdff70ef44c3dbc142e2c45b474df52f216e7d58cf556a525df0683bc447481ab7b27d')
-build() {
+prepare() {
cd "$srcdir/$pkgname-$pkgver"
yarn install
- yarn build:dir
}
-package() {
+build() {
cd "$srcdir/$pkgname-$pkgver"
+ yarn build:dir
+}
- install -d "$pkgdir/usr/lib"
- cp -r "build/linux-unpacked" "$pkgdir/usr/lib/$pkgname"
-
- # Symlink main binary
- install -d "$pkgdir/usr/bin"
- ln -s "/usr/lib/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
+package() {
+ # Install app.asar and launcher script
+ install -D "$srcdir/$pkgname-$pkgver/build/linux-unpacked/resources/app.asar" "$pkgdir/usr/share/marktext/app.asar"
+ install -D "$srcdir/marktext.sh" "$pkgdir/usr/bin/$pkgname"
# Install desktop file and icon
- install -D "resources/linux/marktext.desktop" "$pkgdir/usr/share/applications/marktext.desktop"
- install -D "resources/icons/icon.png" "$pkgdir/usr/share/pixmaps/marktext.png"
+ install -D "$srcdir/$pkgname-$pkgver/resources/linux/marktext.desktop" "$pkgdir/usr/share/applications/marktext.desktop"
+ install -D "$srcdir/$pkgname-$pkgver/resources/icons/icon.png" "$pkgdir/usr/share/pixmaps/marktext.png"
}
diff --git a/marktext.sh b/marktext.sh
new file mode 100644
index 00000000000..02d1f6c36a4
--- /dev/null
+++ b/marktext.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+electron /usr/share/marktext/app.asar $@