31bf7980e4fee8c7eb92cb92db4988e9039762b5
[gentoo.git] /
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 COMMIT_HASH="ad2dd1ad48ad9a5899e14a9e0873244a3e15b82e"
7 DESCRIPTION="Moves legacy tray icons to top panel"
8 HOMEPAGE="https://extensions.gnome.org/extension/1031/topicons/"
9 SRC_URI="https://github.com/phocean/TopIcons-plus/archive/${COMMIT_HASH}.tar.gz -> ${P}.tar.gz"
10 S="${WORKDIR}/TopIcons-plus-${COMMIT_HASH}"
11
12 LICENSE="GPL-2+"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE=""
16
17 # glib for glib-compile-schemas at build time, needed at runtime anyways
18 DEPEND="
19         dev-libs/glib:2
20 "
21 RDEPEND="${DEPEND}
22         app-eselect/eselect-gnome-shell-extensions
23         >=gnome-base/gnome-shell-3.16
24 "
25 BDEPEND=""
26
27 PATCHES=(
28         "${FILESDIR}"/restore-3.22-compat.patch # https://github.com/phocean/TopIcons-plus/pull/136
29 )
30
31 #src_compile() {
32         # It redoes this with "make install" later due to a dumb Makefile, so don't bother
33         #make build
34 #}
35
36 src_install() {
37         # TODO: Figure out if we can get the schemas to standard location, in a way that works properly runtime too
38         make install INSTALL_PATH="${ED}/usr/share/gnome-shell/extensions/"
39         rm "${ED}/usr/share/gnome-shell/extensions/TopIcons@phocean.net/README.md" || die
40         # Assuming it needs only compiled gettext catalogs at runtime
41         rm "${ED}/usr/share/gnome-shell/extensions/TopIcons@phocean.net/locale"/*/LC_MESSAGES/*.po || die
42         dodoc README.md
43 }
44
45 pkg_postinst() {
46         ebegin "Updating list of installed extensions"
47         eselect gnome-shell-extensions update
48         eend $?
49 }