blob: 35434d0523b1f80b975526f7fcb1f2026efe12df (
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CRATES="
autocfg@1.1.0
bitflags@1.3.2
bitflags@2.8.0
cassowary@0.3.0
cc@1.0.83
cfg-if@1.0.0
crossterm@0.26.1
crossterm_winapi@0.9.1
deentry@0.0.1
env_logger@0.9.3
getrandom@0.3.1
humantime@2.1.0
libc@0.2.169
lock_api@0.4.10
log@0.4.20
memoffset@0.6.5
mio@0.8.8
nix@0.23.2
once_cell@1.18.0
pam-sys@0.5.6
pam@0.7.0
parking_lot@0.12.1
parking_lot_core@0.9.8
ppv-lite86@0.2.17
proc-macro2@1.0.93
quote@1.0.38
rand@0.9.0
rand_chacha@0.9.0
rand_core@0.9.1
ratatui@0.21.0
redox_syscall@0.3.5
scopeguard@1.2.0
serde@1.0.188
serde_derive@1.0.188
signal-hook-mio@0.2.3
signal-hook-registry@1.4.1
signal-hook@0.3.17
smallvec@1.11.0
syn@2.0.98
toml@0.5.11
unicode-ident@1.0.12
unicode-segmentation@1.10.1
unicode-width@0.1.11
users@0.8.1
uzers@0.11.3
wasi@0.11.0+wasi-snapshot-preview1
wasi@0.13.3+wasi-0.2.2
winapi-i686-pc-windows-gnu@0.4.0
winapi-x86_64-pc-windows-gnu@0.4.0
winapi@0.3.9
windows-sys@0.48.0
windows-targets@0.48.5
windows-targets@0.52.6
windows_aarch64_gnullvm@0.48.5
windows_aarch64_gnullvm@0.52.6
windows_aarch64_msvc@0.48.5
windows_aarch64_msvc@0.52.6
windows_i686_gnu@0.48.5
windows_i686_gnu@0.52.6
windows_i686_gnullvm@0.52.6
windows_i686_msvc@0.48.5
windows_i686_msvc@0.52.6
windows_x86_64_gnu@0.48.5
windows_x86_64_gnu@0.52.6
windows_x86_64_gnullvm@0.48.5
windows_x86_64_gnullvm@0.52.6
windows_x86_64_msvc@0.48.5
windows_x86_64_msvc@0.52.6
wit-bindgen-rt@0.33.0
zerocopy-derive@0.8.20
zerocopy@0.8.20
"
RUST_MIN_VER="1.84.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"
RDEPEND="${DEPEND}
sys-libs/pam
systemd? ( sys-apps/systemd:= )
!systemd? ( sys-apps/kbd )
"
PATCHES=()
QA_FLAGS_IGNORED="usr/bin/lemurs"
src_prepare() {
default
# 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 "$(cargo_target_dir)"/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
if use systemd ; then
elog "To start lemurs:"
elog " systemctl start lemurs"
elog "To start 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 "Willem Grant <willemgrant@protonmail.com>"
ewarn
else
elog "To start lemurs:"
elog " rc-service lemurs start"
elog "To boot it with the system:"
elog " rc-update add lemurs"
ewarn "The config file at /etc/lemurs/config.toml assumes a Systemd system. This is on lines 136 and 150, where it uses the systemctl command to reboot or power off. To ensure the function keys properly shut down or reboot the system, change those lines to use OpenRC appropriate commands."
fi
}
|