summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Gathoye2018-07-03 18:25:15 +0200
committerWilliam Gathoye2018-07-03 18:40:01 +0200
commit6521440cf633124db72eb208905cdef757e38323 (patch)
treea9ad0cd983986fea791b8d55e283415a8a219b22
parentdf0fb47b3c02a2b10bac9ec59c59d59edcc47ec6 (diff)
downloadaur-6521440cf633124db72eb208905cdef757e38323.tar.gz
Correct PKGBUILD against given guidelines
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD57
-rw-r--r--mattermost.desktop (renamed from Mattermost.desktop)5
3 files changed, 34 insertions, 34 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2da74ec585a1..ac5403ac5e10 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mattermost-desktop
pkgdesc = Mattermost Desktop application for Linux (Beta)
pkgver = 4.1.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/mattermost/desktop
arch = i686
arch = x86_64
@@ -9,9 +9,9 @@ pkgbase = mattermost-desktop
makedepends = npm
makedepends = git
depends = electron
- source = https://github.com/mattermost/desktop/archive/v4.1.2.tar.gz
+ source = mattermost-desktop-4.1.2.tar.gz::https://github.com/mattermost/desktop/archive/v4.1.2.tar.gz
source = mattermost-desktop.sh
- source = Mattermost.desktop
+ source = mattermost.desktop
sha512sums = d43f4adab5310a5f37bd2fcf4788af71a81ed4b384013be9a71643629ca15b9f36a2dfd77294673597a750eb8539ca9a96ad892ddb0a92290b2648ed96967c12
sha512sums = a36e5c26458a1166595b9858d2f8d40213bf7a177d86eaec1398167fbc87bcae7c3dc9416db0409b4cf4742eb497af139e2a552cdc3f1f9f9ae33f985a8511d8
sha512sums = 5fc51cd6ee2e77a8e40736612a23e38b4649f4a2cc45f90f92fae73c396ee9d74dc5e743773fc376b52b268b482a2449212616fb4864fd79dca507d34b45c6a9
diff --git a/PKGBUILD b/PKGBUILD
index f358aa5a25f2..c39b064c3b88 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,30 @@
-# Maintainer: Aleksandar Trifunović <akstrfn at gmail dot com>
# Maintainer: William Gathoye <william at gathoye dot be>
+# Maintainer: 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.1.2
-pkgrel=1
+pkgrel=2
pkgdesc="Mattermost Desktop application for Linux (Beta)"
arch=('i686' 'x86_64')
url="https://github.com/mattermost/desktop"
license=('Apache')
depends=('electron')
makedepends=('npm' 'git')
-source=("https://github.com/mattermost/desktop/archive/v${pkgver}.tar.gz"
- "$pkgname.sh"
- "Mattermost.desktop")
-sha512sums=('d43f4adab5310a5f37bd2fcf4788af71a81ed4b384013be9a71643629ca15b9f36a2dfd77294673597a750eb8539ca9a96ad892ddb0a92290b2648ed96967c12'
- 'a36e5c26458a1166595b9858d2f8d40213bf7a177d86eaec1398167fbc87bcae7c3dc9416db0409b4cf4742eb497af139e2a552cdc3f1f9f9ae33f985a8511d8'
- '5fc51cd6ee2e77a8e40736612a23e38b4649f4a2cc45f90f92fae73c396ee9d74dc5e743773fc376b52b268b482a2449212616fb4864fd79dca507d34b45c6a9')
+source=(
+ "${pkgname}-${pkgver}.tar.gz"::"${url}/archive/v${pkgver}.tar.gz"
+ "${pkgname}.sh"
+ "${pkgname/-/.}"
+)
+sha512sums=(
+ 'd43f4adab5310a5f37bd2fcf4788af71a81ed4b384013be9a71643629ca15b9f36a2dfd77294673597a750eb8539ca9a96ad892ddb0a92290b2648ed96967c12'
+ 'a36e5c26458a1166595b9858d2f8d40213bf7a177d86eaec1398167fbc87bcae7c3dc9416db0409b4cf4742eb497af139e2a552cdc3f1f9f9ae33f985a8511d8'
+ 'a8db88c1db7cba497ee2a1db059430d235942052322b26a2ece7a1340a28ae24686630fa89a37fcfa6bf9f277cbf8a7018ce78e7117b247b2b408fa0fb709d84'
+)
prepare() {
- cd "${srcdir}/desktop-${pkgver}"
+ cd "desktop-${pkgver}"
# Depending on the architecture, in order to accelerate the build process,
# removes the compilation of ia32 or x64 build.
@@ -36,32 +41,26 @@ prepare() {
}
build() {
- cd "${srcdir}/desktop-${pkgver}"
-
- # Hack (npm bug? https://github.com/npm/npm/issues/19989)
- {
- npm install --cache "${srcdir}/npm-cache"
- } || {
- npm install --cache "${srcdir}/npm-cache"
- } || {
- npm install --cache "${srcdir}/npm-cache"
- }
+ cd "desktop-${pkgver}"
+ npm install --cache "${srcdir}/npm-cache"
npm run build --cache "${srcdir}/npm-cache"
- npm run package:linux --cache "${srcdir}/npm-cache"
}
package() {
- cd "${srcdir}/desktop-${pkgver}"
-
- install -d -m 755 "${pkgdir}"/usr/lib
- cp -r release/linux*unpacked/resources "$pkgdir/usr/lib/mattermost-desktop"
+ cd "desktop-${pkgver}"
+ npm run package:linux --cache "${srcdir}/npm-cache"
- install -d -m 755 "$pkgdir/usr/bin"
- install -D -m 755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/mattermost-desktop"
+ install -d "${pkgdir}/usr/lib"
+ # The star in the unpackaged is needed for i686 or ARM platforms.
+ cp -r release/linux*unpacked/resources "${pkgdir}/usr/lib/${pkgname}"
- install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ # SVG icon available in next release
+ # install -Dm644 resources/linux/icon.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
+ install -Dm644 resources/linux/icon.png "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${pkgname}.png"
- install -Dm644 "$srcdir"/Mattermost.desktop "$pkgdir/usr/share/applications/$pkgname.desktop"
- install -Dm644 "$srcdir/desktop-$pkgver/release/linux-unpacked/icon.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
+ cd "${srcdir}"
+ install -Dm755 ${pkgname}.sh "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm644 ${pkgname/-/.} -t "${pkgdir}/usr/share/applications/"
}
diff --git a/Mattermost.desktop b/mattermost.desktop
index e42b6f8e9cbe..1520a1ebb33e 100644
--- a/Mattermost.desktop
+++ b/mattermost.desktop
@@ -1,7 +1,8 @@
[Desktop Entry]
Name=Mattermost
Comment=Mattermost Desktop application for Linux
-Exec="mattermost-desktop"
+Exec=/usr/bin/mattermost-desktop
Terminal=false
Type=Application
-Icon=/usr/share/pixmaps/mattermost-desktop.png
+Icon=mattermost-desktop
+Categories=Network;InstantMessaging;