summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Lisin2019-01-01 00:11:05 +0100
committerMatthias Lisin2019-01-01 00:11:05 +0100
commit2db85d43eb83805217ad9f4ca2d3c466780a4850 (patch)
tree49aa0491c8aa52010a56ba656ae79e5552170efb
parent4d86983c8eb1b31c7942ce72b25895cf841857c0 (diff)
downloadaur-2db85d43eb83805217ad9f4ca2d3c466780a4850.tar.gz
upgpkg: rocketchat-desktop-2.14.6-2
The package now uses the system electron2. Therefore it is now a dependency of this package. Don't worry about the additional size of the new dependency, because this package lost most than 120M of size itself! Spell checking now uses the system hunspell dictionaries instead of using the ones provided by upstream. This is a breaking change and you need to install the desired hunspell-* packages to re-enable spell checking. Again, this is a zero sum game, the size gained by installing system hunspell dicts is lost through removing the package dicts.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD30
-rw-r--r--fix-dictionaries.patch20
-rwxr-xr-xrocketchat-desktop3
-rw-r--r--rocketchat-desktop.install11
5 files changed, 60 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c1c3cc2b422c..386d04a632b0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = rocketchat-desktop
pkgdesc = Rocket.Chat Native Cross-Platform Desktop Application via Electron.
pkgver = 2.14.6
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/RocketChat/Rocket.Chat.Electron
+ install = rocketchat-desktop.install
arch = i686
arch = x86_64
license = MIT
@@ -10,6 +11,7 @@ pkgbase = rocketchat-desktop
makedepends = node-gyp
makedepends = python2
makedepends = yarn
+ depends = electron2
depends = nss
depends = libxss
depends = gconf
@@ -17,12 +19,16 @@ pkgbase = rocketchat-desktop
depends = glibc
conflicts = rocketchat-client-bin
source = rocketchat-desktop-2.14.6.tar.gz::https://github.com/RocketChat/Rocket.Chat.Electron/archive/2.14.6.tar.gz
+ source = rocketchat-desktop
source = fix-linux-target.patch
source = fix-gulp-release.patch
+ source = fix-dictionaries.patch
source = rocketchat-desktop.desktop
sha512sums = 58b427e9745fa8b3866d1ea9c144c700faed7838c0fba6f070592dfdaea7e6509e6e53f5983494431a7976db919b65ad798b7b5cacac998e049239bb41ede0b8
+ sha512sums = 8b6ddebe3e65d959c535c046b07291eb049a80996a28eccab1e45830dc85af8e62a8a52597fe53b038a14e96bbbc870ea9cd1555f3b50b580f9fdd6b0fd52886
sha512sums = 31e0b1d7d9a5fefa4ad4d186df2b3eb8849d7dee9dd3fa14fff6741006ef31191575a23ba62a86f53cf9fc692d138db6a380e2ad860077bc3d854c5a9083b716
sha512sums = 796a2a56a1facc2519d65955bb39d78733c13b5993c4b03cd2af11b83aa9c6132c0fbf9e7160146c6c87bc91cb04c4e66932fe891449d031c787284b5ce9d72a
+ sha512sums = ed0bc8884ea3c7ca50ae8f6aef415aecfac89f958939c1ccb6c86480a7210ead0df2fe0548e465fc1dd559436bae9db779d408e8a754e986cc8a976cd6590878
sha512sums = d87664b9bdf30eac3011393d094962e0d568a94b5eaf4c8e5f17529442dcba905cea7341527066102a97a07a981acd6ce045b8737eb78a7d81a2a2d05023fe26
pkgname = rocketchat-desktop
diff --git a/PKGBUILD b/PKGBUILD
index fffc657e24f7..4ab42a903e66 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,21 +3,26 @@
pkgname=rocketchat-desktop
pkgver=2.14.6
_srcname="Rocket.Chat.Electron-$pkgver"
-pkgrel=1
+pkgrel=2
pkgdesc='Rocket.Chat Native Cross-Platform Desktop Application via Electron.'
arch=('i686' 'x86_64')
url="https://github.com/RocketChat/Rocket.Chat.Electron"
license=('MIT')
-depends=('nss' 'libxss' 'gconf' 'gtk3' 'glibc')
+depends=('electron2' 'nss' 'libxss' 'gconf' 'gtk3' 'glibc')
makedepends=('nodejs' 'node-gyp' 'python2' 'yarn')
conflicts=('rocketchat-client-bin')
+install=rocketchat-desktop.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/RocketChat/Rocket.Chat.Electron/archive/$pkgver.tar.gz"
+ rocketchat-desktop
fix-linux-target.patch
fix-gulp-release.patch
+ fix-dictionaries.patch
rocketchat-desktop.desktop)
sha512sums=('58b427e9745fa8b3866d1ea9c144c700faed7838c0fba6f070592dfdaea7e6509e6e53f5983494431a7976db919b65ad798b7b5cacac998e049239bb41ede0b8'
+ '8b6ddebe3e65d959c535c046b07291eb049a80996a28eccab1e45830dc85af8e62a8a52597fe53b038a14e96bbbc870ea9cd1555f3b50b580f9fdd6b0fd52886'
'31e0b1d7d9a5fefa4ad4d186df2b3eb8849d7dee9dd3fa14fff6741006ef31191575a23ba62a86f53cf9fc692d138db6a380e2ad860077bc3d854c5a9083b716'
'796a2a56a1facc2519d65955bb39d78733c13b5993c4b03cd2af11b83aa9c6132c0fbf9e7160146c6c87bc91cb04c4e66932fe891449d031c787284b5ce9d72a'
+ 'ed0bc8884ea3c7ca50ae8f6aef415aecfac89f958939c1ccb6c86480a7210ead0df2fe0548e465fc1dd559436bae9db779d408e8a754e986cc8a976cd6590878'
'd87664b9bdf30eac3011393d094962e0d568a94b5eaf4c8e5f17529442dcba905cea7341527066102a97a07a981acd6ce045b8737eb78a7d81a2a2d05023fe26')
if [[ $CARCH == "i686" ]]; then
_releasename="release:linux-ia32"
@@ -28,21 +33,24 @@ else
fi
prepare() {
- patch -p1 -d "$_srcname" < fix-linux-target.patch
- patch -p1 -d "$_srcname" < fix-gulp-release.patch
+ for patch in *.patch; do
+ patch -p1 -d "$_srcname" < "$patch"
+ done
}
build() {
- cd "$srcdir/$_srcname"
+ cd "$_srcname"
yarn install --non-interactive --pure-lockfile --cache-folder "$srcdir/yarn-cache"
yarn build --env=production "$_releasename"
}
package() {
- install -d "$pkgdir"/{usr/bin,opt}
- install -Dm644 "$srcdir/$_srcname/build/icons/512x512.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/$pkgname.png"
- install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
- install -Dm644 "$srcdir/$_srcname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- cp -r "$srcdir/$_srcname/dist/$_distname" "$pkgdir/opt/$pkgname"
- ln -sf "/opt/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
+ install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
+ install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
+
+ cd "$srcdir/$_srcname"
+ install -Dm644 "build/icons/512x512.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/$pkgname.png"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 "dist/$_distname/resources/app.asar" "$pkgdir/usr/lib/$pkgname/app.asar"
+ #cp -r dist/$_distname/resources/dictionaries "$pkgdir/usr/lib/$pkgname/dictionaries"
}
diff --git a/fix-dictionaries.patch b/fix-dictionaries.patch
new file mode 100644
index 000000000000..4c7ea91cb285
--- /dev/null
+++ b/fix-dictionaries.patch
@@ -0,0 +1,20 @@
+diff -ura package.orig/src/public/lib/SpellCheck.js package.new/src/public/lib/SpellCheck.js
+--- package.orig/src/public/lib/SpellCheck.js 2018-12-31 23:10:21.364014246 +0100
++++ package.new/src/public/lib/SpellCheck.js 2018-12-31 23:21:27.153584606 +0100
+@@ -156,12 +156,10 @@
+ if (this.availableDictionaries.length === 0) {
+ this.multiLanguage = false;
+ // Dictionaries path is correct for build
+- this.dictionariesPath = path.join(
+- app.getAppPath(),
+- app.getAppPath().endsWith('app.asar') ? '..' : '.',
+- 'dictionaries'
+- );
+- this.getDictionariesFromInstallDirectory();
++ if (fs.existsSync('/usr/share/hunspell')) {
++ this.dictionariesPath = '/usr/share/hunspell';
++ this.getDictionariesFromInstallDirectory();
++ }
+ } else {
+ this.multiLanguage = process.platform !== 'win32';
+ this.availableDictionaries = this.availableDictionaries.map((dict) => dict.replace('-', '_'));
diff --git a/rocketchat-desktop b/rocketchat-desktop
new file mode 100755
index 000000000000..5e4ea35fdd77
--- /dev/null
+++ b/rocketchat-desktop
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec electron2 /usr/lib/rocketchat-desktop/app.asar "$@"
diff --git a/rocketchat-desktop.install b/rocketchat-desktop.install
new file mode 100644
index 000000000000..5b6892e3d639
--- /dev/null
+++ b/rocketchat-desktop.install
@@ -0,0 +1,11 @@
+post_install() {
+ echo "
+
+To enable spell checking, install the desired hunspell-* packages!
+
+"
+}
+
+post_upgrade() {
+ post_install
+}