From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 13EBA158089 for ; Thu, 14 Sep 2023 13:22:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 195EC2BC092; Thu, 14 Sep 2023 13:22:56 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 02A0C2BC091 for ; Thu, 14 Sep 2023 13:22:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AAE8D335D68 for ; Thu, 14 Sep 2023 13:22:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F418211AD for ; Thu, 14 Sep 2023 13:22:51 +0000 (UTC) From: "David Roman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Roman" Message-ID: <1694593956.211c116fa68caf140df10fbae290eddfe5835cfc.davidroman@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: gui-apps/lemurs/ X-VCS-Repository: repo/proj/guru X-VCS-Files: gui-apps/lemurs/lemurs-0.3.1-r1.ebuild X-VCS-Directories: gui-apps/lemurs/ X-VCS-Committer: davidroman X-VCS-Committer-Name: David Roman X-VCS-Revision: 211c116fa68caf140df10fbae290eddfe5835cfc X-VCS-Branch: master Date: Thu, 14 Sep 2023 13:22:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f8d693d9-d7dc-4f12-8d9a-3ef4906ace34 X-Archives-Hash: b5a1a81b6102ff172614b34b68d34708 commit: 211c116fa68caf140df10fbae290eddfe5835cfc Author: Remigiusz Micielski purelymail com> AuthorDate: Wed Sep 13 08:32:36 2023 +0000 Commit: David Roman gmail com> CommitDate: Wed Sep 13 08:32:36 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=211c116f gui-apps/lemurs: fix shutdown and reboot on non-systemd systems Signed-off-by: Remigiusz Micielski purelymail.com> gui-apps/lemurs/lemurs-0.3.1-r1.ebuild | 145 +++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) diff --git a/gui-apps/lemurs/lemurs-0.3.1-r1.ebuild b/gui-apps/lemurs/lemurs-0.3.1-r1.ebuild new file mode 100644 index 0000000000..d659cf07ba --- /dev/null +++ b/gui-apps/lemurs/lemurs-0.3.1-r1.ebuild @@ -0,0 +1,145 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" + autocfg@1.1.0 + bitflags@1.3.2 + cassowary@0.3.0 + cc@1.0.79 + cfg-if@1.0.0 + crossterm@0.20.0 + crossterm@0.22.1 + crossterm_winapi@0.8.0 + crossterm_winapi@0.9.0 + env_logger@0.9.3 + getrandom@0.2.8 + instant@0.1.12 + libc@0.1.12 + libc@0.2.139 + lock_api@0.4.9 + log@0.4.17 + memoffset@0.6.5 + mio@0.7.14 + miow@0.3.7 + nix@0.23.2 + ntapi@0.3.7 + numtoa@0.1.0 + pam@0.7.0 + pam-sys@0.5.6 + parking_lot@0.11.2 + parking_lot_core@0.8.6 + pgs-files@0.0.7 + ppv-lite86@0.2.17 + proc-macro2@1.0.51 + quote@1.0.23 + rand@0.8.5 + rand_chacha@0.3.1 + rand_core@0.6.4 + redox_syscall@0.2.16 + redox_termios@0.1.2 + scopeguard@1.1.0 + serde@1.0.152 + serde_derive@1.0.152 + signal-hook@0.3.15 + signal-hook-mio@0.2.3 + signal-hook-registry@1.4.1 + smallvec@1.10.0 + syn@1.0.109 + termion@1.5.6 + toml@0.5.11 + tui@0.16.0 + unicode-ident@1.0.6 + unicode-segmentation@1.10.1 + unicode-width@0.1.10 + users@0.8.1 + users@0.11.0 + wasi@0.11.0+wasi-snapshot-preview1 + winapi@0.3.9 + winapi-i686-pc-windows-gnu@0.4.0 + winapi-x86_64-pc-windows-gnu@0.4.0 +" + +inherit cargo pam systemd + +DESCRIPTION="A TUI Display/Login Manager" +HOMEPAGE="https://github.com/coastalwhite/lemurs" +SRC_URI="https://github.com/coastalwhite/lemurs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz \ +${CARGO_CRATE_URIS}" + +LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD MIT Unicode-DFS-2016" +SLOT="0" +KEYWORDS="~amd64" +IUSE="systemd" + +DEPEND="" +RDEPEND="${DEPEND} + sys-libs/pam + systemd? ( sys-apps/systemd:= ) + !systemd? ( sys-apps/kbd ) +" +BDEPEND="" + +QA_FLAGS_IGNORED="usr/bin/lemurs" + +src_prepare() { + eapply_user + # Run lemurs on tty7 so it doesn't conflict with agetty + # And replace systemd's reboot and shutdown commands + if ! use systemd ; then + sed -i 's/tty = 2/tty = 7/' "${S}"/extra/config.toml || die "Sed on config.toml failed" + + sed -i 's/shutdown_cmd = "systemctl poweroff -l"/shutdown_cmd = "poweroff"/' \ + "${S}"/extra/config.toml || die "Sed on config.toml failed" + + sed -i 's/reboot_cmd = "systemctl reboot -l"/reboot_cmd = "reboot"/' \ + "${S}"/extra/config.toml || die "Sed on config.toml failed" + fi +} + +src_install() { + dodir /etc/lemurs + keepdir /etc/lemurs/{wayland,wms} + + exeinto /etc/lemurs + doexe "${S}"/extra/xsetup.sh + + insinto /etc/lemurs + doins "${S}"/extra/config.toml + + dodoc "${S}"/README.md + + # Lemur's default PAM doesn't make elogind do its job + # i.e. doesn't make /run/user/* + newpamd "${FILESDIR}"/lemurs.pam lemurs + + newinitd "${FILESDIR}"/lemurs.initd lemurs + systemd_dounit "${S}"/extra/lemurs.service + + dobin target/$(usex debug debug release)/lemurs +} + +pkg_postinst() { + elog "Before starting lemurs you have to configure all your WMs/DEs manually," + elog "see: https://github.com/coastalwhite/lemurs#usage" + elog "and disable your previous display manager." + elog + if use systemd ; then + elog "To start lemurs:" + elog " systemctl start lemurs" + elog "To boot it with the system:" + elog " systemctl enable lemurs" + ewarn "This package has not yet been tested on a systemd system," + ewarn "so it may not function properly." + ewarn "If possible, please email the package maintainer to confirm that it works (or not):" + ewarn + ewarn "Remigiusz Micielski " + ewarn + else + elog "To start lemurs:" + elog " rc-service lemurs start" + elog "To boot it with the system:" + elog " rc-update add lemurs" + fi +}