summaryrefslogtreecommitdiff
blob: 07a085adf15da9b7f8c2e19aa8222a69ea9afad3 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517="setuptools"
PYTHON_COMPAT=( python3_{9..11} )

inherit distutils-r1 gnome2-utils xdg-utils

DESCRIPTION="A lightweight user-configuration application"
HOMEPAGE="https://github.com/bluesabre/mugshot"
SRC_URI="https://github.com/bluesabre/${PN}/archive/${P}.tar.gz"
S="${WORKDIR}/${PN}-${P}"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="gnome libreoffice webcam"

COMMON_DEPEND="
	dev-libs/gobject-introspection
	dev-python/dbus-python[${PYTHON_USEDEP}]
	dev-python/pexpect[${PYTHON_USEDEP}]
	dev-python/pygobject:3[${PYTHON_USEDEP}]

"

RDEPEND="
	${COMMON_DEPEND}
	dev-python/pycairo[${PYTHON_USEDEP}]
	sys-apps/accountsservice
	sys-apps/shadow
	gnome? ( gnome-base/gnome-control-center )
	libreoffice? (
		|| (
			app-office/libreoffice-bin
			app-office/libreoffice
		)
	)
	webcam? (
		media-libs/gstreamer:1.0
		media-libs/gst-plugins-good:1.0
		gnome? (
			media-libs/clutter-gtk[introspection]
			media-video/cheese[introspection]
		)
	)
"

DEPEND="
	${COMMON_DEPEND}
	x11-libs/gtk+:3[introspection]
"

BDEPEND="
	dev-python/python-distutils-extra[${PYTHON_USEDEP}]
	dev-util/intltool
"

python_install() {
	distutils-r1_python_install

	python_optimize

	# Since DOCS are installed twice, remove the wrong path
	rm -r "${ED}"/usr/share/doc/mugshot || die
}

pkg_postinst() {
	gnome2_schemas_update
	xdg_icon_cache_update
}

pkg_postrm() {
	gnome2_schemas_update
	xdg_icon_cache_update
}