summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2021-07-23 11:04:33 +0300
committerCaleb Maclennan2021-07-23 11:04:33 +0300
commit60148537f20cbd5b3839849441742b8dc19ef554 (patch)
tree12d23aa11d29452fc5bb5818027bd8cd1d738140
parent98a34e71e2051153ae837558cc99f0a096f5cde7 (diff)
downloadaur-60148537f20cbd5b3839849441742b8dc19ef554.tar.gz
upgpkg: mattermost-desktop 4.7.0-1
upstream release
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD128
2 files changed, 75 insertions, 63 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d02b4ed034d4..64fdfde21f2a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = mattermost-desktop
pkgdesc = Mattermost Desktop application for Linux
- pkgver = 4.6.2
+ pkgver = 4.7.0
pkgrel = 1
url = https://github.com/mattermost/desktop
arch = x86_64
@@ -8,14 +8,14 @@ pkgbase = mattermost-desktop
license = Apache
makedepends = git
makedepends = jq
+ makedepends = moreutils
makedepends = npm
- depends = electron7
- source = mattermost-desktop-4.6.2.tar.gz::https://github.com/mattermost/desktop/archive/v4.6.2.tar.gz
+ depends = electron12
+ source = mattermost-desktop-4.7.0.tar.gz::https://github.com/mattermost/desktop/archive/v4.7.0.tar.gz
source = mattermost-desktop.sh
source = mattermost.desktop
- sha256sums = 620ff64ec2c04bfe1005c25988a5d4cb20e376bc9dca9e3ce3e11dbd59ad0b47
+ sha256sums = f327d8560bebeb2075c7369898c3ed6c2d11be952a44853822a663ba42144055
sha256sums = 0f18f87764465f1fc5a9fdfb6ef2834af4623c13bc95fce58da6cb0d8d39a75e
sha256sums = e628268d3393aac0d5b7237c6b8818d2e362c373f99874a19171bf96a25e4ffa
pkgname = mattermost-desktop
-
diff --git a/PKGBUILD b/PKGBUILD
index 8bac9df464c6..16e91cadee50 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,81 +5,93 @@
# Contributor: Bruno Pagani <archange at archlinux dot org>
pkgname=mattermost-desktop
-pkgver=4.6.2
+pkgver=4.7.0
pkgrel=1
pkgdesc='Mattermost Desktop application for Linux'
-arch=('x86_64' 'i686')
+arch=(x86_64 i686)
url="https://github.com/${pkgname/-//}"
-license=('Apache')
-depends=('electron7')
-makedepends=('git' 'jq' 'npm')
+license=(Apache)
+_electron=electron12
+_builderVersion='^20.10.4'
+depends=($_electron)
+makedepends=(git jq moreutils npm)
#optdepends=('hunspell: spell checking')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
"$pkgname.sh"
"${pkgname/-/.}")
-sha256sums=('620ff64ec2c04bfe1005c25988a5d4cb20e376bc9dca9e3ce3e11dbd59ad0b47'
+sha256sums=('f327d8560bebeb2075c7369898c3ed6c2d11be952a44853822a663ba42144055'
'0f18f87764465f1fc5a9fdfb6ef2834af4623c13bc95fce58da6cb0d8d39a75e'
'e628268d3393aac0d5b7237c6b8818d2e362c373f99874a19171bf96a25e4ffa')
prepare() {
- cd "desktop-$pkgver"
+ cd "desktop-$pkgver"
- # Depending on the architecture, in order to accelerate the build process,
- # removes the compilation of ia32 or x64 build.
- if [[ "$CARCH" == x86_64 ]];then
- sed -i 's/--ia32//g' package.json
- else
- sed -i 's/--x64//g' package.json
- fi
+ sed -i -e "s/git rev-parse --short HEAD/echo $pkgver/" webpack.config.base.js
- # Do not build tar.gz, nor .deb or appimages. This reduces build time.
- jq '.linux .target |= ["dir"]' \
- electron-builder.json > electron-builder-new.json
- # jq cannot output to the same file it get input from.
- mv electron-builder-new.json electron-builder.json
+ # Depending on the architecture, in order to accelerate the build process,
+ # removes the compilation of ia32 or x64 build.
+ if [[ "$CARCH" == x86_64 ]];then
+ sed -i 's/--ia32//g' package.json
+ else
+ sed -i 's/--x64//g' package.json
+ fi
+ local electronDist="/usr/lib/$_electron"
+ local electronVersion="$(<"$electronDist"/version)"
- # Prepend to system electron in order to avoid an unneeded download.
- local electronDist="/usr/lib/electron7"
- local electronVersion="$(<"$electronDist"/version)"
- jq '{"electronDist": $electronDist, "electronVersion": $electronVersion} + .' \
- --arg electronDist "$electronDist" \
- --arg electronVersion "$electronVersion" \
- electron-builder.json > electron-builder-new.json
- mv electron-builder-new.json electron-builder.json
+ # Do not build tar.gz, nor .deb or appimages
+ # Use electron version that matches system package
+ jq '
+ .linux .target |= ["dir"] |
+ {
+ "electronDist": $electronDist,
+ "electronVersion": $electronVersion
+ } + .
+ ' \
+ --arg electronDist "$electronDist" \
+ --arg electronVersion "$electronVersion" \
+ electron-builder.json |
+ sponge electron-builder.json
+ jq '
+ del(.devDependencies["electron"]) |
+ .devDependencies["electron-builder"] = $builderVersion
+ ' \
+ --arg electronVersion "$electronVersion" \
+ --arg builderVersion "$_builderVersion" \
+ package.json |
+ sponge package.json
- # Mattermost Desktop is using simple-spellchecker which prevents to bind on
- # the system Arch Linux hunspell dictionnaries. This is due to the fact
- # simple-spellchecker comes with its own set of dictionnaries. They differ
- # from the hunspell dictionnaries in the sense of, hunspell's dictionnaries
- # have additional pieces of info attributed to each line.
- # e.g. in /usr/share/hunspell/fr_FR.dic, "ordinateur" (computer in English)
- # ordinateur/S*() po:nom is:mas
- # simple-spellcheck expects a line with:
- # ordinateur
- # instead
- #
- # Asking upstream to switch to electron-spellchecker will fix the issue.
- # https://github.com/electron-userland/electron-spellchecker
+ # Mattermost Desktop is using simple-spellchecker which prevents to bind on
+ # the system Arch Linux hunspell dictionnaries. This is due to the fact
+ # simple-spellchecker comes with its own set of dictionnaries. They differ
+ # from the hunspell dictionnaries in the sense of, hunspell's dictionnaries
+ # have additional pieces of info attributed to each line.
+ # e.g. in /usr/share/hunspell/fr_FR.dic, "ordinateur" (computer in English)
+ # ordinateur/S*() po:nom is:mas
+ # simple-spellcheck expects a line with:
+ # ordinateur
+ # instead
+ #
+ # Asking upstream to switch to electron-spellchecker will fix the issue.
+ # https://github.com/electron-userland/electron-spellchecker
- # Install dependencies should be in prepare(), that way we don't need an
- # internet connection during build().
- # We don't need to run "npm run build" because that target is run by "npm
- # run package:linux" any way.
- npm install --cache "$srcdir/npm-cache"
+ # Install dependencies should be in prepare(), that way we don't need an
+ # internet connection during build().
+ # We don't need to run "npm run build" because that target is run by "npm
+ # run package:linux" any way.
+ npm install --cache "$srcdir/npm-cache"
}
-package() {
- cd "desktop-$pkgver"
- npm run package:linux --cache "$srcdir/npm-cache"
-
- install -d "$pkgdir/usr/lib"
- # The wildcard in the unpackaged is needed for i686 or ARM platforms.
- install -Dm644 release/linux*unpacked/resources/app.asar "$pkgdir/usr/lib/$pkgname/app.asar"
-
- install -Dm644 LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname"
- install -Dm644 resources/linux/icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"
+build() {
+ cd "desktop-$pkgver"
+ npm run package:linux --cache "$srcdir/npm-cache"
+}
- cd "$srcdir"
- install -Dm755 "$pkgname".sh "$pkgdir/usr/bin/$pkgname"
- install -Dm644 "${pkgname/-/.}" -t "$pkgdir/usr/share/applications/"
+package() {
+ cd "desktop-$pkgver"
+ install -d "$pkgdir/usr/lib"
+ install -Dm0644 -t "$pkgdir/usr/lib/$pkgname/" release/linux*unpacked/resources/app.asar
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
+ install -Dm0644 src/assets/linux/icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"
+ install -Dm0755 "../$pkgname".sh "$pkgdir/usr/bin/$pkgname"
+ install -Dm0644 -t "$pkgdir/usr/share/applications/" "../${pkgname/-/.}"
}