Name: ly Version: 1.4.0 Release: 1%{?dist} Summary: TUI display manager # Disable debuginfo generation - Zig doesn't produce build IDs compatible with RPM's find-debuginfo %global debug_package %{nil} License: WTFPL URL: https://github.com/fairyglade/ly Source0: https://github.com/fairyglade/ly/archive/v%{version}/ly-%{version}.tar.gz Source1: ly.te BuildRequires: zig >= 0.13.0 BuildRequires: pam-devel BuildRequires: libxcb-devel BuildRequires: systemd-rpm-macros BuildRequires: xorg-x11-xauth BuildRequires: selinux-policy-devel BuildRequires: policycoreutils-devel Requires: pam Requires: libxcb Requires: xorg-x11-xauth %description Ly is a lightweight TUI (Text User Interface) display manager for Linux and BSD. %prep %autosetup -n ly cp %{SOURCE1} . %build # add -Dcpu=baseline to ensure it runs on all x86_64 CPUs zig build --global-cache-dir .zig-cache -Dcpu=baseline --release=fast # 2. Compile SELinux policy make -f /usr/share/selinux/devel/Makefile ly.pp %install zig build installexe \ --global-cache-dir .zig-cache \ -Dcpu=baseline \ -Ddest_directory=%{buildroot} \ -Dconfig_directory=%{_sysconfdir} \ -Dprefix_directory=%{_prefix} \ -Dinit_system=systemd \ --release=fast # 2. Install SELinux module install -d %{buildroot}%{_datadir}/selinux/packages install -m 644 ly.pp %{buildroot}%{_datadir}/selinux/packages/ %files # %license LICENSE # %doc README.md %{_bindir}/ly %{_sysconfdir}/ly/ %config(noreplace) %{_sysconfdir}/ly/config.ini %{_sysconfdir}/pam.d/ly %{_sysconfdir}/pam.d/ly-autologin %{_unitdir}/ly@.service %{_datadir}/selinux/packages/ly.pp %post %systemd_post ly@.service if [ $1 -eq 1 ]; then semodule -i %{_datadir}/selinux/packages/ly.pp || : fi %preun %systemd_preun ly@.service %postun %systemd_postun_with_restart ly@.service if [ $1 -eq 0 ]; then semodule -r ly || : fi %changelog * Tue Jan 13 2026 Package Maintainer - 1.4.0-1 - Initial Package