Package Details: mattermost-desktop 5.0.2-2

Git Clone URL: https://aur.archlinux.org/mattermost-desktop.git (read-only, click to copy)
Package Base: mattermost-desktop
Description: Mattermost Desktop application for Linux
Upstream URL: https://github.com/mattermost/desktop
Keywords: chat mattermost messenger networking slack
Licenses: Apache
Submitter: nineinchnick
Maintainer: alerque (wget)
Last Packager: alerque
Votes: 65
Popularity: 2.55
First Submitted: 2016-04-02 09:08
Last Updated: 2021-11-26 16:52

Pinned Comments

alerque commented on 2021-05-25 18:03

PSA: Like most of the PKGBUILDs that I (co-)maintain, I host prebuilt packages for this in my user repository and all its dependencies for those who wish to install it using pacman without messing around with building from the AUR. Issues or contributions are welcome either in comments below or via this GitHub repository.

Latest Comments

1 2 3 4 5 6 ... Next › Last »

Archange commented on 2021-11-26 07:45

You’ve missed the main part of 5.0 update that was moving to electron14!

alerque commented on 2021-07-23 08:13

@Severus I did not use Electron 13 because my testing it ran into some UI‌ glitches, and since upstream specified 12 and 12 is in [community] repos right now it seemed best to use that.

I'll fix the runner script, good catch.

Severus commented on 2021-07-23 08:10

also change mattermost-desktop.sh to electron12 too

Severus commented on 2021-07-23 08:10

I wonder why we didnot use electron 13

alerque commented on 2021-07-23 08:03

@Severus While your changes were a bit incomplete the version-bump on electron builder was a good tip. Armed with that I think I got the rest of this worked out, and with some other patch work it's now up to the current version.

Severus commented on 2021-07-23 07:54

First, I change npm to yarn to get latest version of electron-builder than 22.10.5 to 22.11.7 here is my PKGBUILD

# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Maintainer: William Gathoye <william + aur at gathoye dot be>
# Contributor: Aleksandar Trifunović <akstrfn at gmail dot com>
# Contributor: Jan Was <janek dot jan at gmail dot com>
# Contributor: Bruno Pagani <archange at archlinux dot org>

pkgname=mattermost-desktop
pkgver=4.7.0
pkgrel=1
pkgdesc='Mattermost Desktop application for Linux'
arch=('x86_64' 'i686')
url="https://github.com/${pkgname/-//}"
license=('Apache')
depends=('electron')
makedepends=('git' 'jq' 'npm')
#optdepends=('hunspell: spell checking')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
        "$pkgname.sh"
        "${pkgname/-/.}")
sha256sums=('SKIP'
            '0f18f87764465f1fc5a9fdfb6ef2834af4623c13bc95fce58da6cb0d8d39a75e'
            'e628268d3393aac0d5b7237c6b8818d2e362c373f99874a19171bf96a25e4ffa')

prepare() {
    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

    # 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

    # Prepend to system electron in order to avoid an unneeded download.
    local electronDist="/usr/lib/electron"
    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
    sed -i 's#resources/linux#src/assets/linux#' electron-builder.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

    # 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.
    yarn install
}

package() {
    cd "desktop-$pkgver"
    yarn package:linux

    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 src/assets/linux/icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"

    cd "$srcdir"
    install -Dm755 "$pkgname".sh "$pkgdir/usr/bin/$pkgname"
    install -Dm644 "${pkgname/-/.}" -t "$pkgdir/usr/share/applications/"
}

alerque commented on 2021-07-23 07:39

@Severus I would be happy to take a look at updating this if you post for PKGBUILD (bonus points if you do so as a PR here) but even a patch or paste in comments here would work); but I don't think it's quite as simple as you suggest. At the very least that doesn't get around this upstream bug but I suspect there are even more issues.

Severus commented on 2021-07-23 04:57

@alerque change electron builder to 22.10.4 and set linux assets to src/assets/linux, I build it fine

alerque commented on 2021-07-17 07:03

If anyone can figure out how to make this build and run against the relevant Arch Electron package I'm more than willing to consider a patch here or PR here. I've made some progress but gotten stuck several different places.

alerque commented on 2021-06-24 18:10

Thanks for the flags. I see 4.7.0 is out, but there are enough upstream changes and Electron shenanigans in play that it won't be super simple to update. I've started the process but haven't gotten it working yet. Please be patient.