diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 71 | ||||
-rw-r--r-- | ferdi.desktop | 12 | ||||
-rw-r--r-- | ferdi.sh | 3 |
4 files changed, 109 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..659e83a66bcf --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = ferdi-git + pkgdesc = Free messaging app for services like WhatsApp, Slack, Messenger and many more. fork removing the non-skippable app delay frequently inviting you to buy a licence + pkgver = 5.1.0 + pkgrel = 1 + epoch = 1 + url = https://meetfranz.com + arch = x86_64 + arch = i686 + license = Apache + makedepends = expac + makedepends = git + makedepends = npm + makedepends = python2 + depends = electron + source = git+https://github.com/kytwb/ferdi/ + source = ferdi.desktop + source = ferdi.sh + sha512sums = SKIP + sha512sums = SKIP + sha512sums = SKIP + +pkgname = ferdi-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e58f803248a0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Christoph Mohr <christoph.mohr@gmail.com> +# Contributor: Giovanni 'ItachiSan' Santini <giovannisantini93@yahoo.it> +# Contributor: Filipe LaĆns (FFY00) <lains@archlinux.org> +# Contributor: Pieter Goetschalckx <3.14.e.ter <at> gmail <dot> com> + +pkgname=ferdi-git +_pkgver=5.1.0 +pkgver=${_pkgver//-/_} +pkgrel=1 +# Due to the previous "_beta" naming +epoch=1 +pkgdesc='Free messaging app for services like WhatsApp, Slack, Messenger and many more. fork removing the non-skippable app delay frequently inviting you to buy a licence' +arch=(x86_64 i686) +url='https://meetfranz.com' +license=(Apache) +depends=(electron) +makedepends=(expac git npm python2) +source=("git+https://github.com/kytwb/ferdi/" + 'ferdi.desktop' + 'ferdi.sh') +sha512sums=('SKIP' + 'SKIP' + 'SKIP') + +prepare() { + # Prepare Python 2 for later + mkdir python2_path + ln -s `which python2` python2_path/python + + # Small patching + cd $pkgname + + # Prevent franz from being launched in dev mode + sed -i "s|export const isDevMode = .*|export const isDevMode = false;|g" \ + src/environment.js + sed -i "s|import isDevMode from 'electron-is-dev'|export const isDevMode = false|g" \ + src/index.js + + # Adjust the electron version to use when building + electron_version="`expac %v electron | cut -d'-' -f1`" + sed -i "s|\(\s\+\"electron\":\).*,|\1 \"$electron_version\",|" package.json +} + +build() { + cd $pkgname + + # Better configuration for npm cache and calling installed binaries + export npm_config_cache="$srcdir"/npm_cache + export PATH="$srcdir/$pkgname/node_modules/.bin:$srcdir/python2_path:$PATH" + + npm install lerna + lerna bootstrap + gulp build + electron-builder --linux dir +} + +package() { + cd $pkgname + + # Install the .asar files + install -dm 755 "$pkgdir"/usr/lib/$pkgname + cp -r --no-preserve=ownership --preserve=mode out/linux-unpacked/resources "$pkgdir"/usr/lib/$pkgname/ + + # Install icon + install -Dm 644 "$srcdir"/ferdi.desktop "$pkgdir"/usr/share/applications/ferdi.desktop + install -Dm 644 build-helpers/images/icon.png "$pkgdir"/usr/share/icons/ferdi.png + + # Install run script + install -Dm 755 "$srcdir"/ferdi.sh "$pkgdir"/usr/bin/ferdi +} + diff --git a/ferdi.desktop b/ferdi.desktop new file mode 100644 index 000000000000..c3795c80e733 --- /dev/null +++ b/ferdi.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=Ferdi +GenericName=Internet Messenger +Comment=A free messaging app for services like WhatsApp, Slack, Messenger and many more. +Icon=franz +TryExec=/usr/bin/ferdi +Exec=/usr/bin/ferdi %U +Terminal=false +Categories=Network;InstantMessaging; +Name[de_DE]=Ferdi diff --git a/ferdi.sh b/ferdi.sh new file mode 100644 index 000000000000..a4a6ab118425 --- /dev/null +++ b/ferdi.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +electron /usr/lib/franz/resources/app.asar "$@" |