summaryrefslogtreecommitdiff
path: root/sys-apps/turnstile/turnstile-9999.ebuild
blob: fcfc612f8ce8d890f9fd3eca5bb5535d5ba14360 (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
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit meson

DESCRIPTION="Independent session/login tracker"
HOMEPAGE="https://github.com/chimera-linux/turnstile"

if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/chimera-linux/${PN}.git"
else
	KEYWORDS="~amd64"
	SRC_URI="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
fi

LICENSE="BSD-2"
SLOT="0"

DEPEND="
	sys-libs/pam
	app-text/scdoc
	dinit? (
		sys-apps/dinit
		sys-apps/dinit-services
	)
	runit? (
		sys-process/runit
	)
"
RDEPEND="${DEPEND}"

IUSE="dinit runit rundir man"

src_configure() {
	local emesonargs=(
		$(meson_feature dinit dinit)
		$(meson_feature runit runit)
		$(meson_use rundir manage_rundir)
		$(meson_use man man)
	)
	meson_src_configure
}

pkg_postinst() {
	elog "For Turnstile to work you will have to add the following to /etc/pam.d/system-login"
	elog ""
	elog "-session        optional        pam_turnstile.so"
	elog ""
	elog "You will also need to enable the turnstiled service on dinit or runit"
}