summaryrefslogtreecommitdiff
blob: 46a1cc78a8a52800c72f2fc033588a3d9f85f5f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

inherit eutils gnome2-utils

DESCRIPTION="Mattermost Desktop application"
HOMEPAGE="https://about.mattermost.com/"
SRC_URI="https://github.com/mattermost/desktop/archive/v${PV}.tar.gz -> ${PV}.tar.gz
		 amd64? ( https://releases.mattermost.com/desktop/3.5.0/mattermost-desktop-${PV}-linux-x64.tar.gz )
		 x86? ( https://releases.mattermost.com/desktop/3.5.0/mattermost-desktop-${PV}-linux-ia32.tar.gz )
"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE=""
RESTRICT="mirror"

DEPEND=""
RDEPEND="${DEPEND}"

S="${WORKDIR}/mattermost-desktop-${PV}"
QA_PREBUILT="opt/mattermost-desktop/mattermost-desktop
	opt/mattermost-desktop/libnode.so
	opt/mattermost-desktop/libffmpeg.so
"

src_install() {
	insinto /opt/mattermost-desktop/locales
	doins locales/*.pak

	insinto /opt/mattermost-desktop/resources
	doins resources/*.asar

	insinto /opt/mattermost-desktop
	doins *.pak
	doins *.bin
	doins *.dat

	exeinto /opt/mattermost-desktop

	doexe *.so
	doexe mattermost-desktop

	dosym /opt/mattermost-desktop/mattermost-desktop /opt/bin/mattermost-desktop

	newicon "${S}/icon.png" mattermost-desktop.png
	make_desktop_entry mattermost-desktop Mattermost mattermost-desktop
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	gnome2_icon_cache_update
}

pkg_postrm() {
	gnome2_icon_cache_update
}