summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 16 insertions, 25 deletions
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"
+}