Last active
August 18, 2018 22:35
-
-
Save ItachiSan/268de4fd81c581a6405ad900414fa624 to your computer and use it in GitHub Desktop.
Fixes to AUR *franz* package: better variable handling, removing unused and adding necessary dependencies, avoid clutter user folders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/PKGBUILD b/PKGBUILD | |
index ecbd55d..9c66e9c 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -2,30 +2,34 @@ | |
# Contributor: Pieter Goetschalckx <3.14.e.ter <at> gmail <dot> com> | |
pkgname=franz | |
-_pkgver=5.0.0-beta.18 | |
-pkgver=${_pkgver//-/_} | |
+pkgver=5.0.0_beta.18 | |
+_pkgver="${pkgver//_/-}" | |
pkgrel=1 | |
pkgdesc="Free messaging app for services like WhatsApp, Slack, Messenger and many more." | |
arch=('i686' 'x86_64') | |
url="https://meetfranz.com" | |
license=('Apache') | |
-depends=('nodejs' 'libx11' 'libxkbfile' 'libxext' 'libxss' 'gconf' 'gtk2' 'alsa-lib' 'nss' 'libxtst' 'nodejs-nan') | |
-makedepends=('npm' 'python2') | |
+depends=('nodejs' 'libx11' 'libxkbfile' 'libxext' 'libxss' 'gconf' 'gtk2' 'alsa-lib' 'nss' 'libxtst') | |
+makedepends=('npm' 'python2' 'git') | |
source=("https://github.com/meetfranz/$pkgname/archive/v$_pkgver.tar.gz" | |
- 'franz.desktop') | |
+ "franz.desktop") | |
sha256sums=('24768724ea51cc27ccb16997151f0f012c5dd4198ecf32b29826165ef294f2a2' | |
- '79813a0f7db258fc7c4969cc20b412771530865bec36c0a4b9e18a2e435d97b8') | |
+ '79813a0f7db258fc7c4969cc20b412771530865bec36c0a4b9e18a2e435d97b8') | |
build() { | |
- cd $pkgname-$_pkgver | |
+ # Better configuration for npm cache and calling installed binaries | |
+ export npm_config_cache="$srcdir/npm_cache" | |
+ export PATH="$srcdir/$pkgname-$_pkgver/node_modules/.bin:$PATH" | |
+ | |
+ cd "$srcdir/$pkgname-$_pkgver" | |
npm install --production --non-interactive | |
npm add electron-builder gulpjs/gulp#4.0 | |
- node_modules/.bin/gulp build | |
- node_modules/.bin/electron-builder --linux dir | |
+ gulp build | |
+ electron-builder --linux dir | |
} | |
package() { | |
- cd $pkgname-$_pkgver | |
+ cd "$srcdir/$pkgname-$_pkgver" | |
install -d "$pkgdir"/usr/bin "$pkgdir"/usr/share | |
cp -r --no-preserve=ownership --preserve=mode out/linux-unpacked "$pkgdir"/usr/share/franz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment