summaryrefslogtreecommitdiff
path: root/sys-auth/authenticator/authenticator-4.6.2.ebuild
blob: 591a129ea06a6f9e206114fae7037b0039418909 (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
79
80
81
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

RUST_MIN_VER="1.82"

inherit cargo gnome2-utils meson xdg

DESCRIPTION="2FA code generator for GNOME"
HOMEPAGE="https://gitlab.gnome.org/World/Authenticator"
SRC_URI="
	https://gitlab.gnome.org/World/Authenticator/-/archive/${PV}/Authenticator-${PV}.tar.bz2 -> ${P}.tar.bz2
	https://gitlab.com/api/v4/projects/69517529/packages/generic/${PN}/${PV}/${P}-deps.tar.xz
	https://gitlab.gnome.org/World/Authenticator/-/commit/d3a63c5d66b8812fd24eea8634ad17f42f9d6d04.patch
		-> ${PN}-4.6.2-update-metainfo-file.patch
"

S="${WORKDIR}/Authenticator-${PV}"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debug test"
RESTRICT="!test? ( test )"

RDEPEND="
	dev-db/sqlite:3
	dev-libs/glib:2
	dev-libs/openssl
	gui-libs/gtk:4[wayland]
	gui-libs/libadwaita:1
	media-libs/graphene
	media-libs/gst-plugins-base:1.0
	media-libs/gstreamer:1.0
	media-plugins/gst-plugin-gtk4
	x11-libs/gdk-pixbuf:2
"
DEPEND="${RDEPEND}"
BDEPEND="
	dev-libs/appstream
	dev-libs/glib:2
	dev-util/desktop-file-utils
	dev-util/gtk-update-icon-cache
	sys-devel/gettext

	debug? ( dev-vcs/git )
"

QA_FLAGS_IGNORED="usr/bin/authenticator"

PATCHES=(
	"${DISTDIR}/${PN}-4.6.2-update-metainfo-file.patch"
)

src_configure() {
	local profile="default"
	use debug && profile="development"

	local emesonargs=(
		-Dprofile="$profile"
	)
	meson_src_configure

	ln -s "${CARGO_HOME}" "${BUILD_DIR}/cargo-home" || die
}

src_test() {
	cargo_src_test
	meson_src_test
}

pkg_postinst() {
	xdg_pkg_postinst
	gnome2_schemas_update
}

pkg_postrm() {
	xdg_pkg_postrm
	gnome2_schemas_update
}