summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBrLi2019-12-10 23:38:59 +0800
committerBrLi2019-12-10 23:38:59 +0800
commit74847a6f82212d73a08b661fdd53518dc0b5ad1b (patch)
tree5af85bece6e0c8b683fb77806dae9aff63ab7157 /PKGBUILD
parentfcf80d26ed3fbc3f0e7bf3b2bfaa02537f019bcf (diff)
downloadaur-74847a6f82212d73a08b661fdd53518dc0b5ad1b.tar.gz
aggressively remove binaries in node_modules
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD18
1 files changed, 13 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9f9de08a2429..2317c11786d6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=zettlr
pkgver=1.4.3
-pkgrel=1
+pkgrel=2
pkgdesc="A markdown editor for writing academic texts and taking notes"
arch=('x86_64')
url="https://www.zettlr.com"
@@ -16,6 +16,11 @@ source=($pkgname::git+https://github.com/Zettlr/Zettlr.git#tag=v$pkgver)
sha1sums=(SKIP)
prepare() {
+ cd $srcdir/$pkgname
+
+ # We don't build electron, and doesn't depends on postinstall script
+ sed '/"electron"/d;/postinstall/d' -i package.json
+
# Add some close-to-complete translations
cd $srcdir/$pkgname/scripts
sed "s/'fr-FR'/'fr-FR','ja-JP','zh-CN','es-ES','ru-RU'/" -i refresh-language.js
@@ -42,12 +47,15 @@ package() {
sed "s,$srcdir/$pkgname/source,$_destdir,g" -i renderer/assets/vue/vue-sidebar.js
cp -r --no-preserve=ownership --preserve=mode * "$pkgdir/$_destdir/"
- # Remove unneeded addin
- find $pkgdir/$_destdir -name "fonts" -exec rm -rfv {} +
- find $pkgdir/$_destdir -name ".gitignore" -or -name ".eslintrc.json" -or -name ".npmignore" -exec rm -rfv {} +
+ # Aggressively remove binary and addins in node_modules
+ find $pkgdir/$_destdir -type d -name "fonts" -exec rm -rfv {} +
+ find $pkgdir/$_destdir -name "\.bin" -exec rm -rfv {} +
+ find $pkgdir/$_destdir -name "\.gitignore" -exec rm -rfv {} +
+ find $pkgdir/$_destdir -name "\.eslintrc.json" -exec rm -rfv {} +
+ find $pkgdir/$_destdir -name "\.npmignore" -exec rm -rfv {} +
install -Dm755 /dev/stdin $pkgdir/usr/bin/$pkgname <<END
-#!/bin/bash
+#!/bin/sh
exec electron /$_destdir "\$@"
END