summaryrefslogtreecommitdiff
path: root/sys-auth/fprintd/fprintd-1.94.0.ebuild
blob: c4cc4c06087a92299e5043592e5c39fbf6714456 (plain) (blame)
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-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7,8,9} )
inherit meson pam python-single-r1 systemd

DESCRIPTION="D-Bus service to access fingerprint readers"
HOMEPAGE="https://cgit.freedesktop.org/libfprint/fprintd/"
SHA="fc7e058e937db861d1868a55b5316798d14fe0b7"
SRC_URI="https://gitlab.freedesktop.org/libfprint/fprintd/-/archive/v${PV}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="gtk-doc +pam static-libs systemd test"
REQUIRED_USE="systemd? ( pam )
	test? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"

RDEPEND="dev-libs/dbus-glib
	dev-libs/glib:2
	>=sys-auth/libfprint-${PV}
	sys-auth/polkit
	systemd? ( sys-apps/systemd )
	pam? (
		systemd? ( sys-apps/systemd )
		!systemd? ( sys-auth/elogind )
		sys-libs/pam
	)"
DEPEND="${RDEPEND}
	dev-util/intltool
	gtk-doc? (
		dev-util/gtk-doc
		dev-util/gtk-doc-am
		dev-libs/libxml2
	)"
BDEPEND="test? (
		dev-python/python-dbusmock
		pam? ( sys-libs/pam_wrapper )
	)"

PATCHES=(
	"${FILESDIR}/${PN}-1.90.7_0001-add-test-feature-and-make-tests-optional.patch"
	"${FILESDIR}/${PN}-1.90.8_0002-add-configure-option-for-libsystemd-provider.patch"
)

S="${WORKDIR}/${PN}-v${PV}-${SHA}"

DOCS=( pam/README )

src_configure() {
	local emesonargs=(
		$(meson_feature test)
		$(meson_use pam)
		-Dsystemd_system_unit_dir=$(systemd_get_systemunitdir)
		-Dman=true
		-Dgtk_doc=$(usex gtk-doc true false)
		-Dpam_modules_dir=$(getpam_mod_dir)
		-Dlibsystemd=$(usex systemd libsystemd libelogind)
	)
	meson_src_configure
}

src_install() {
	meson_src_install
	keepdir /var/lib/fprint
	find "${D}" -name "*.la" -delete || die
	einstalldocs
	if use gtk-doc; then
		insinto /usr/share/doc/${PF}/html
		doins doc/{fprintd-docs,version}.xml
		insinto /usr/share/doc/${PF}/html/dbus
		doins doc/dbus/net.reactivated.Fprint.{Device,Manager}.ref.xml
	fi
}

pkg_postinst() {
	elog "Please take a look at README.pam_fprintd for integration docs."
}