summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGitSquared2019-11-07 22:36:51 +0100
committerGitSquared2019-11-07 22:36:51 +0100
commita32c2c04cece47ea5387edced113fb9365f7ba4f (patch)
treea17e19069ca00bc23a3c5898a866b54d090209e1
parent0c4884d24f1a92634bc0e90ec7165e99442cea7b (diff)
downloadaur-a32c2c04cece47ea5387edced113fb9365f7ba4f.tar.gz
Adoption, packaging rewrite
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD41
-rw-r--r--marktext.install10
-rw-r--r--marktext.sh2
4 files changed, 32 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5b2519b0935..fe5a6c51703 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,23 +1,21 @@
pkgbase = marktext
pkgdesc = A simple and elegant open-source markdown editor that focused on speed and usability
pkgver = 0.15.1
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/marktext/marktext
+ install = marktext.install
arch = x86_64
license = MIT
makedepends = nodejs
- makedepends = yarn
makedepends = npm
makedepends = python2
- makedepends = libxkbfile
- makedepends = git
- depends = electron
+ makedepends = tar
+ depends = libxkbfile
+ provides = marktext
conflicts = marktext-bin
conflicts = marktext-git
- source = marktext-0.15.1.tar.gz::http://github.com/marktext/marktext/archive/v0.15.1.tar.gz
- source = marktext.sh
+ source = http://github.com/marktext/marktext/archive/v0.15.1.tar.gz
sha512sums = d78954493c0035f6d7b85b84798bf1bb6093fc276f2b9d50e1cf78d32dbc72a0629f33c6d56985d6ddb8b26b89cfb46077e03a929f63f12a1cde4eb807bc02c0
- sha512sums = 8927cea6815420206982263d80fa54bbcfcc37623008b6a2f25d16782cfdff70ef44c3dbc142e2c45b474df52f216e7d58cf556a525df0683bc447481ab7b27d
pkgname = marktext
diff --git a/PKGBUILD b/PKGBUILD
index d1774ac25e8..01f440357e3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,46 +1,37 @@
# Contributor: David Birks <david@tellus.space>
# Contributor: Simon Doppler (dopsi) <dop.simon@gmail.com>
# Contributor: dpeukert
+# Contributor: Gabriel Saillard (GitSquared) <gabriel@saillard.dev>
pkgname=marktext
pkgver=0.15.1
-pkgrel=2
+pkgrel=3
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')
+provides=('marktext')
conflicts=('marktext-bin' 'marktext-git')
-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=('d78954493c0035f6d7b85b84798bf1bb6093fc276f2b9d50e1cf78d32dbc72a0629f33c6d56985d6ddb8b26b89cfb46077e03a929f63f12a1cde4eb807bc02c0'
- '8927cea6815420206982263d80fa54bbcfcc37623008b6a2f25d16782cfdff70ef44c3dbc142e2c45b474df52f216e7d58cf556a525df0683bc447481ab7b27d')
+depends=('libxkbfile')
+makedepends=('nodejs' 'npm' 'python2' 'tar')
+source=("http://github.com/marktext/marktext/archive/v${pkgver}.tar.gz")
+sha512sums=('d78954493c0035f6d7b85b84798bf1bb6093fc276f2b9d50e1cf78d32dbc72a0629f33c6d56985d6ddb8b26b89cfb46077e03a929f63f12a1cde4eb807bc02c0')
+install='marktext.install'
prepare() {
- cd "$srcdir/$pkgname-$pkgver"
- yarn install
+ cd "${pkgname}-${pkgver}"
+ npx yarn install
}
build() {
- cd "$srcdir/$pkgname-$pkgver"
- yarn run build
+ cd "${pkgname}-${pkgver}"
+ node .electron-vue/build.js && ./node_modules/.bin/electron-builder build --dir --linux pacman
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ tar xf ${pkgname}-${pkgver}/build/marktext-*.pacman -C "${pkgdir}"
- # Install app.asar and launcher script
- install -D build/linux-unpacked/resources/app.asar "${pkgdir}/usr/share/marktext/app.asar"
- cp -r build/linux-unpacked/resources/app.asar.unpacked "${pkgdir}/usr/share/marktext/app.asar.unpacked"
- install -D "${srcdir}/marktext.sh" "${pkgdir}/usr/bin/marktext"
+ rm -f "${pkgdir}/.INSTALL" "${pkgdir}/.MTREE" "${pkgdir}/.PKGINFO"
- # 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 license file
- install -D LICENSE "${pkgdir}/usr/share/licenses/marktext/LICENSE"
- install -D build/linux-unpacked/LICENSE.electron.txt "${pkgdir}/usr/share/licenses/marktext/LICENSE.electron.txt"
- install -D build/linux-unpacked/LICENSES.chromium.html "${pkgdir}/usr/share/licenses/marktext/LICENSES.chromium.html"
-} \ No newline at end of file
+ chmod 755 "${pkgdir}/opt/Mark Text/marktext"
+}
diff --git a/marktext.install b/marktext.install
new file mode 100644
index 00000000000..12e113fdcc5
--- /dev/null
+++ b/marktext.install
@@ -0,0 +1,10 @@
+post_install() {
+ ln -sf '/opt/Mark Text/marktext' '/usr/bin/marktext'
+
+ update-mime-database /usr/share/mime || true
+ update-desktop-database /usr/share/applications || true
+}
+
+post_remove() {
+ rm -f '/usr/bin/marktext'
+}
diff --git a/marktext.sh b/marktext.sh
deleted file mode 100644
index 02d1f6c36a4..00000000000
--- a/marktext.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-electron /usr/share/marktext/app.asar $@