summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCaleb Maclennan2021-06-11 17:59:42 +0300
committerCaleb Maclennan2021-06-11 17:59:42 +0300
commit9873fac42fcb7a51f618cf6dbab00678ecc06bad (patch)
tree3deb3abe05a1f202f4521fcb04655376558addc7 /PKGBUILD
parentff6a4e67b90dd61751a409a2320444f749de5771 (diff)
downloadaur-9873fac42fcb7a51f618cf6dbab00678ecc06bad.tar.gz
upgpkg: marktext 0.16.3-2
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD35
1 files changed, 19 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b64b00eaaf8..1cfe7564452 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,21 +6,23 @@
pkgname=marktext
pkgver=0.16.3
-pkgrel=1
+pkgrel=2
pkgdesc='A simple and elegant open-source markdown editor that focused on speed and usability'
-arch=('x86_64')
+arch=(x86_64)
url='https://marktext.app'
-license=('MIT')
-depends=('electron'
- 'libxkbfile'
- 'libsecret'
- 'ripgrep')
-makedepends=('jq'
- 'nodejs'
- 'node-gyp'
- 'moreutils'
- 'yarn'
- 'yq')
+license=(MIT)
+_electron=electron11
+depends=("$_electron"
+ libxkbfile
+ libsecret
+ ripgrep)
+makedepends=(jq
+ nodejs
+ npm
+ node-gyp
+ moreutils
+ yarn
+ yq)
source=("$pkgname-$pkgver.tar.gz::https://github.com/marktext/marktext/archive/v${pkgver}.tar.gz"
"$pkgname.sh"
"$pkgname-arg-handling.patch")
@@ -30,8 +32,8 @@ sha256sums=('ab7702558a09f9be5326a03ad56249378fad67138dd21261458b60d4b37191ce'
prepare() {
- local _electronDist=$(dirname $(realpath $(which electron)))
- local _electronVersion=$(electron --version | sed -e 's/^v//')
+ local _electronDist=$(dirname $(realpath $(which $_electron)))
+ local _electronVersion=$($_electron --version | sed -e 's/^v//')
cd "$pkgname-$pkgver"
jq 'del(.devDependencies["electron"], .scripts["preinstall", "postinstall"])' \
package.json | sponge package.json
@@ -41,6 +43,7 @@ prepare() {
yarn --cache-folder "$srcdir/node_modules" install --frozen-lockfile
yarn --cache-folder "$srcdir/node_modules" add -D --no-lockfile --ignore-scripts electron@$_electronVersion
patch -p1 < "$srcdir/$pkgname-arg-handling.patch"
+ sed -e "s/\belectron\b/$_electron/" "../$pkgname.sh" > "$pkgname.sh"
}
build() {
@@ -54,7 +57,7 @@ build() {
package() {
cd "$pkgname-$pkgver"
- install -Dm755 "../$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
+ install -Dm755 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
local _dist=build/linux-unpacked/resources
install -Dm644 -t "$pkgdir/usr/lib/$pkgname/" "$_dist/app.asar"
cp -a "$_dist"/{app.asar.unpacked,hunspell_dictionaries} "$pkgdir/usr/lib/$pkgname/"