summaryrefslogtreecommitdiff
blob: f52096ee48dbd3ca4aba7878a55cea79c808bfd6 (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit gnome2-utils

# Useful specially to prevent
# https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4684
# https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3180
DESCRIPTION="Restore the alphabetical ordering of the app grid"
HOMEPAGE="https://github.com/stuarthayhurst/alphabetical-grid-extension"
SRC_URI="https://github.com/stuarthayhurst/alphabetical-grid-extension/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""

RDEPEND="
	app-eselect/eselect-gnome-shell-extensions
	>=gnome-base/gnome-shell-3.38
"
DEPEND="${COMMON_DEPEND}"
BDEPEND=""

S="${WORKDIR}/alphabetical-grid-extension-${PV}"
extension_uuid="AlphabeticalAppGrid@stuarthayhurst"

# Tests are only useful for upstream
RESTRICT="test"

# Not useful for us
src_compile() { :; }

src_install() {
	einstalldocs
	mv docs/icon.svg extension || die
	cd extension || die
	insinto /usr/share/glib-2.0/schemas
	doins schemas/*.xml
	rm -rf schemas || die
	insinto /usr/share/gnome-shell/extensions/"${extension_uuid}"
	doins -r *
}

pkg_preinst() {
	gnome2_schemas_savelist
}

pkg_postinst() {
	gnome2_schemas_update
	ebegin "Updating list of installed extensions"
	eselect gnome-shell-extensions update
	eend $?
}

pkg_postrm() {
	gnome2_schemas_update
}