From 96dd36ebc133c046c83f78b9e5d6681d195583a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zyxhere=F0=9F=92=AD?= Date: Wed, 7 Oct 2026 04:00:16 +0000 Subject: [PATCH] sys-apps/turnstile: add an OpenRC service script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part-off: https://codeberg.org/gentoo/guru/pulls/104 Merges: https://codeberg.org/gentoo/guru/pulls/104 Signed-off-by: zyxhere💭 --- sys-apps/turnstile/files/turnstiled | 11 ++++ sys-apps/turnstile/turnstile-0.1.11-r1.ebuild | 58 +++++++++++++++++++ sys-apps/turnstile/turnstile-9999.ebuild | 8 ++- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 sys-apps/turnstile/files/turnstiled create mode 100644 sys-apps/turnstile/turnstile-0.1.11-r1.ebuild diff --git a/sys-apps/turnstile/files/turnstiled b/sys-apps/turnstile/files/turnstiled new file mode 100644 index 0000000000..0e30ddb42a --- /dev/null +++ b/sys-apps/turnstile/files/turnstiled @@ -0,0 +1,11 @@ +#!/sbin/openrc-run + +supervisor=supervise-daemon + +name=Turnstile +description="Independent session/login tracker" +command=/usr/bin/turnstiled + +depend() { + after seatd elogind +} diff --git a/sys-apps/turnstile/turnstile-0.1.11-r1.ebuild b/sys-apps/turnstile/turnstile-0.1.11-r1.ebuild new file mode 100644 index 0000000000..45ed4b6e73 --- /dev/null +++ b/sys-apps/turnstile/turnstile-0.1.11-r1.ebuild @@ -0,0 +1,58 @@ +# 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 +} + +src_install() { + meson_src_install + + doinitd "${FILESDIR}"/${PN}d +} + +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" +} diff --git a/sys-apps/turnstile/turnstile-9999.ebuild b/sys-apps/turnstile/turnstile-9999.ebuild index fcfc612f8c..45ed4b6e73 100644 --- a/sys-apps/turnstile/turnstile-9999.ebuild +++ b/sys-apps/turnstile/turnstile-9999.ebuild @@ -43,10 +43,16 @@ src_configure() { meson_src_configure } +src_install() { + meson_src_install + + doinitd "${FILESDIR}"/${PN}d +} + 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" + elog "You will also need to enable the turnstiled service" }