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

EAPI=7
PYTHON_COMPAT=( python3_9 )
inherit gnome2-utils python-single-r1 meson xdg

DESCRIPTION="GTK app to sync InfiniTime watch with PinePhone"
HOMEPAGE="https://github.com/alexr4535/siglo"
SRC_URI="https://github.com/alexr4535/siglo/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND=""
RDEPEND="${DEPEND}
		${PYTHON_DEPS}
		$(python_gen_cond_dep '
		dev-python/dbus-python[${PYTHON_USEDEP}]
		dev-python/gatt-python[${PYTHON_USEDEP}]
		dev-python/requests[${PYTHON_USEDEP}]
		dev-python/pyxdg[${PYTHON_USEDEP}]
		')"
BDEPEND="${PYTHON_DEPS}"

#tests seem to fail
RESTRICT="test"

src_configure() {
	python_setup
	sed -i "s#python.find_installation('python3').path()#\'${EPYTHON}\'#" src/meson.build
	meson_src_configure
}

src_install() {
	meson_src_install
	python_fix_shebang "${ED}/usr/bin"
	python_optimize
}

pkg_postinst() {
	xdg_pkg_postinst
	gnome2_schemas_update
}

pkg_postrm() {
	xdg_pkg_postrm
	gnome2_schemas_update
}