summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Baz2018-12-31 01:00:01 +0100
committerGitHub2018-12-31 01:00:01 +0100
commit49f94f02aaa9c6aca850a86da116261214677e00 (patch)
tree3056d35b58755421c1f1d86da9669ade81506914
parentc01285809707b81c6a640eddd38c2e65ddcd2a89 (diff)
downloadaur-49f94f02aaa9c6aca850a86da116261214677e00.tar.gz
wire-desktop: compile native extensions against correct electron version (#4)
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD19
2 files changed, 10 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 37ce26f354ad..35aea03138ab 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = wire-desktop
pkgdesc = End-to-end encrypted messenger with file sharing, voice calls and video conferences
pkgver = 3.5.2881
- pkgrel = 2
+ pkgrel = 3
url = https://wire.com/
arch = x86_64
license = GPL3
diff --git a/PKGBUILD b/PKGBUILD
index 36dd3f7b63c7..f995c38e5ca6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=wire-desktop
pkgver=3.5.2881
-pkgrel=2
+pkgrel=3
pkgdesc='End-to-end encrypted messenger with file sharing, voice calls and video conferences'
arch=('x86_64')
url='https://wire.com/'
@@ -18,11 +18,16 @@ sha256sums=('4216cd9c3a2c4920aec2f3c967181b04bfafdb1b47e526a8e823911cce704da1'
'cc9056cecff2aa49a9ce9c8376d57ec8c7c2cb8174f7966b5cdccbeb2e3751ea')
prepare() {
+ # Ensure we compile native extensions against system electron version
+ local electronver="$(pacman -Q electron | cut -d' ' -f2 | cut -d'-' -f1)"
+ msg2 "Compiling against system electron version: $electronver"
+ sed -i 's/"electron": ".*"/"electron": "'"$electronver"'"/' "${pkgname}-linux-${pkgver}/package.json"
+
# Create launcher script
cat << EOF > "${pkgname}"
#!/bin/sh
-electron "/usr/lib/${pkgname}"
+electron "/usr/lib/${pkgname}" "\$@"
EOF
}
@@ -30,13 +35,13 @@ build() {
cd "${pkgname}-linux-${pkgver}"
yarn
yarn build:ts
- npx grunt 'linux-other'
+ npx grunt 'clean:linux' 'update-keys' 'gitinfo' 'release-prod' 'bundle'
}
package() {
# Place files
install -d "${pkgdir}/usr/lib/${pkgname}"
- cp -a "${pkgname}-linux-${pkgver}"/wrap/dist/linux-unpacked/resources/app/* "${pkgdir}/usr/lib/${pkgname}"
+ cp -a "${pkgname}-linux-${pkgver}/electron/"* "${pkgdir}/usr/lib/${pkgname}"
# Place launcher script
install -Dm755 -t "${pkgdir}/usr/bin/" "${pkgname}"
@@ -51,10 +56,4 @@ package() {
# Spellcheck dictionaries
rm -rf "${pkgdir}/usr/lib/${pkgname}/node_modules/spellchecker/vendor/hunspell_dictionaries"
ln -s "/usr/share/hunspell" "${pkgdir}/usr/lib/${pkgname}/node_modules/spellchecker/vendor/hunspell_dictionaries"
-
- # Place license files
- local license
- for license in "LICENSE.electron.txt" "LICENSES.chromium.html"; do
- install -Dm644 "${pkgname}-linux-${pkgver}/wrap/dist/linux-unpacked/${license}" "${pkgdir}/usr/share/licenses/${pkgname}/${license}"
- done
}