Diff slack-bin-2.1.2 with a slack-bin-3.1.1

/usr/portage/net-im/slack-bin/slack-bin-3.1.1.ebuild 2019-07-15 18:40:00.000000000 +0300
1
# Copyright 1999-2017 Gentoo Foundation
1
# Copyright 1999-2019 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=6
5 5

  
6 6
MY_PN="${PN/-bin/}"
7
BASE_URI="https://downloads.slack-edge.com/linux_releases/${MY_PN}-desktop-${PV}-_arch_.deb"
7
MULTILIB_COMPAT=( abi_x86_64 )
8 8

  
9
inherit eutils gnome2-utils unpacker xdg-utils
9
inherit desktop gnome2-utils multilib-build pax-utils unpacker xdg-utils
10 10

  
11 11
DESCRIPTION="Team collaboration tool"
12 12
HOMEPAGE="http://www.slack.com/"
13
SRC_URI="x86? ( ${BASE_URI/_arch_/i386} )
14
	amd64? ( ${BASE_URI/_arch_/amd64} )"
13
SRC_URI="https://downloads.slack-edge.com/linux_releases/${MY_PN}-desktop-${PV}-amd64.deb"
15 14

  
16 15
LICENSE="all-rights-reserved"
17 16
SLOT="0"
18
KEYWORDS="~amd64 ~x86"
19
IUSE=""
17
KEYWORDS="-* ~amd64"
18
IUSE="ayatana gnome-keyring pax_kernel"
20 19
RESTRICT="bindist mirror"
21 20

  
22
RDEPEND="dev-libs/atk:0
23
	dev-libs/expat:0
24
	dev-libs/glib:2
25
	dev-libs/nspr:0
26
	dev-libs/nss:0
27
	gnome-base/gconf:2
28
	gnome-base/libgnome-keyring:0
29
	media-libs/alsa-lib:0
30
	media-libs/fontconfig:1.0
31
	media-libs/freetype:2
32
	net-misc/curl:0
33
	net-print/cups:0
34
	sys-apps/dbus:0
35
	x11-libs/cairo:0
36
	x11-libs/gdk-pixbuf:2
37
	x11-libs/gtk+:2
38
	x11-libs/libX11:0
39
	x11-libs/libXcomposite:0
40
	x11-libs/libXcursor:0
41
	x11-libs/libXdamage:0
42
	x11-libs/libXext:0
43
	x11-libs/libXfixes:0
44
	x11-libs/libXi:0
45
	x11-libs/libXrandr:0
46
	x11-libs/libXrender:0
47
	x11-libs/libXScrnSaver:0
48
	x11-libs/libXtst:0
49
	x11-libs/pango:0"
21
RDEPEND="dev-libs/atk:0[${MULTILIB_USEDEP}]
22
	dev-libs/expat:0[${MULTILIB_USEDEP}]
23
	dev-libs/glib:2[${MULTILIB_USEDEP}]
24
	dev-libs/nspr:0[${MULTILIB_USEDEP}]
25
	dev-libs/nss:0[${MULTILIB_USEDEP}]
26
	gnome-base/gconf:2[${MULTILIB_USEDEP}]
27
	media-libs/alsa-lib:0[${MULTILIB_USEDEP}]
28
	media-libs/fontconfig:1.0[${MULTILIB_USEDEP}]
29
	media-libs/freetype:2[${MULTILIB_USEDEP}]
30
	net-misc/curl:0[${MULTILIB_USEDEP}]
31
	net-print/cups:0[${MULTILIB_USEDEP}]
32
	sys-apps/dbus:0[${MULTILIB_USEDEP}]
33
	x11-libs/cairo:0[${MULTILIB_USEDEP}]
34
	x11-libs/gdk-pixbuf:2[${MULTILIB_USEDEP}]
35
	x11-libs/gtk+:2[${MULTILIB_USEDEP}]
36
	x11-libs/libX11:0[${MULTILIB_USEDEP}]
37
	x11-libs/libxcb:0/1.12[${MULTILIB_USEDEP}]
38
	x11-libs/libXcomposite:0[${MULTILIB_USEDEP}]
39
	x11-libs/libXcursor:0[${MULTILIB_USEDEP}]
40
	x11-libs/libXdamage:0[${MULTILIB_USEDEP}]
41
	x11-libs/libXext:0[${MULTILIB_USEDEP}]
42
	x11-libs/libXfixes:0[${MULTILIB_USEDEP}]
43
	x11-libs/libXi:0[${MULTILIB_USEDEP}]
44
	x11-libs/libxkbfile:0[${MULTILIB_USEDEP}]
45
	x11-libs/libXrandr:0[${MULTILIB_USEDEP}]
46
	x11-libs/libXrender:0[${MULTILIB_USEDEP}]
47
	x11-libs/libXScrnSaver:0[${MULTILIB_USEDEP}]
48
	x11-libs/libXtst:0[${MULTILIB_USEDEP}]
49
	x11-libs/pango:0[${MULTILIB_USEDEP}]
50
	ayatana? ( dev-libs/libappindicator:2[${MULTILIB_USEDEP}] )
51
	gnome-keyring? ( app-crypt/libsecret:0[${MULTILIB_USEDEP}] )"
50 52

  
51 53
QA_PREBUILT="opt/slack/slack
52 54
	opt/slack/resources/app.asar.unpacked/node_modules/*
......
56 58

  
57 59
S="${WORKDIR}"
58 60

  
59
src_install() {
60
	insinto /usr/share/pixmaps
61
	doins usr/share/pixmaps/${MY_PN}.png
61
src_prepare() {
62
	default
63

  
64
	if use ayatana ; then
65
		sed -i '/Exec/s|=|=env XDG_CURRENT_DESKTOP=Unity |' \
66
			usr/share/applications/slack.desktop \
67
			|| die "sed failed for slack.desktop"
68
	fi
69
}
62 70

  
63
	newicon -s 512 usr/share/pixmaps/${MY_PN}.png ${MY_PN}.png
64
	domenu usr/share/applications/${MY_PN}.desktop
71
src_install() {
72
	doicon usr/share/pixmaps/slack.png
73
	doicon -s 512 usr/share/pixmaps/slack.png
74
	domenu usr/share/applications/slack.desktop
75

  
76
	insinto /opt/slack
77
	doins -r usr/lib/slack/.
78
	fperms +x /opt/slack/slack
79
	dosym ../../opt/slack/slack usr/bin/slack
65 80

  
66
	insinto /opt/${MY_PN}
67
	doins -r usr/lib/${MY_PN}/.
68
	fperms +x /opt/${MY_PN}/${MY_PN}
69
	dosym ../../opt/${MY_PN}/${MY_PN} usr/bin/${MY_PN}
81
	use pax_kernel && pax-mark -m "${ED%/}"/opt/slack/slack
70 82
}
71 83

  
72 84
pkg_postinst() {
73 85
	xdg_desktop_database_update
86
	xdg_mimeinfo_database_update
74 87
	gnome2_icon_cache_update
75 88
}
76 89

  
77 90
pkg_postrm() {
78 91
	xdg_desktop_database_update
92
	xdg_mimeinfo_database_update
79 93
	gnome2_icon_cache_update
80 94
}
Thank you!