## START: Set by rpmautospec ## (rpmautospec version 0.6.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 8; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global selinuxtype targeted Name: kmscon Version: 9.0.0 Release: %autorelease Summary: KMS/DRM based System Console License: MIT and LGPLv2+ URL: https://github.com/Aetf/%{name}/ %global git_tag v%{version} Source: https://github.com/Aetf/%{name}/releases/download/%{git_tag}/%{name}-%{version}.tar.xz #Commits are upstream, but not present in release. Patch: 0-0001-Use-correct-systemd-system-unit-directory.patch Patch: 0-0002-build-fix-duplicated-libdrm-dependency-detection.patch Patch: 0-0003-tests-fix-warnings.patch Patch: 0-0004-Make-code-sent-by-backspace-key-configurable.patch Patch: 0-0005-Add-Check-unit-test-files-for-libshl.patch Patch: 0-0006-Allow-quoting-to-preserve-spaces-in-the-login-option.patch #These are additional patches from https://github.com/MacSlow/kmscon #They've been submitted upstream, but aren't merged yet Patch: 1-0001-Ported-output-rotation-support-from-my-MacSlow-old-k.patch Patch: 1-0002-Ported-mouse-selection-cut-paste-support-from-my-Mac.patch Patch: 1-0003-Ported-gyro-sensor-support-from-my-MacSlow-old-kmsco.patch Patch: 1-0004-Add-a-man-page-for-the-kmscon.conf-file.patch Patch: 1-0005-Make-sure-lm-is-included-during-linking-on-systems-w.patch Source1: kmscon.te Source2: kmscon-default.conf BuildRequires: gcc BuildRequires: meson BuildRequires: pkgconfig(check) BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libtsm) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pango) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(dbus-1) BuildRequires: libxslt BuildRequires: docbook-style-xsl BuildRequires: systemd BuildRequires: selinux-policy-devel BuildRequires: container-selinux Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %description Kmscon is a simple terminal emulator based on Linux kernel mode setting (KMS). It is an attempt to replace the in-kernel VT implementation with a user-space console. See kmscon(1) man-page for usage information. %package services Summary: Systemd units for %{name} Requires: %{name} = %{version}-%{release} Requires: %{name}-selinux = %{version}-%{release} BuildRequires: systemd-rpm-macros Requires: kmscon %description services This package contains optional systemd units for automatically starting kmscon on all TTYs. See kmscon(1) for instructions on how to replace fbcon. %package selinux Summary: SELinux policy module for %{name} Requires: %{name} = %{version}-%{release} Requires: container-selinux %{?selinux_requires} %description selinux This package contains the SELinux policy module necessary to run kmscon's systemd units. %prep %autosetup -p1 mkdir SELinux cp %{S:1} SELinux/ %build #fbdev is not included in fedora, so don't build support for it %meson -Dvideo_fbdev=disabled %meson_build cd SELinux %{__make} NAME=%{selinuxtype} -f /usr/share/selinux/devel/Makefile %install %meson_install %{__install} -d %{buildroot}%{_datadir}/selinux/%{selinuxtype} %{__install} -p -m 644 SELinux/%{name}.pp %{buildroot}%{_datadir}/selinux/%{selinuxtype}/%{name}.pp %{__install} -d %{buildroot}%{_sysconfdir}/kmscon/ %{__install} -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/kmscon/ %posttrans if [ ! -e %{_sysconfdir}/kmscon/kmscon.conf ]; then ln -sf kmscon-default.conf %{_sysconfdir}/kmscon/kmscon.conf fi %files %{_bindir}/kmscon %{_libdir}/kmscon/mod-bbulk.so %{_libdir}/kmscon/mod-gltex.so %{_libdir}/kmscon/mod-pango.so %{_libdir}/kmscon/mod-pixman.so %{_libdir}/kmscon/mod-unifont.so %{_libexecdir}/kmscon/kmscon %{_mandir}/man1/kmscon.1.gz %{_mandir}/man1/kmscon.conf.1.gz %attr(0750,root,root) %dir %{_sysconfdir}/kmscon %ghost %config(noreplace) %{_sysconfdir}/kmscon/kmscon.conf %config(noreplace) %{_sysconfdir}/kmscon/kmscon-default.conf %files services %{_unitdir}/kmscon.service %{_unitdir}/kmsconvt@.service %files selinux %doc SELinux/%{name}.te %{_datadir}/selinux/%{selinuxtype}/%{name}.pp %post services %systemd_post kmscon.service %systemd_post kmsconvt@.service %preun services %systemd_preun kmscon.service %systemd_preun kmsconvt@.service %postun services %systemd_postun_with_restart kmscon.service %systemd_postun_with_restart kmsconvt@.service %pre selinux %selinux_relabel_pre -s %{selinuxtype} %post selinux %selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/%{selinuxtype}/%{name}.pp %selinux_relabel_post -s %{selinuxtype} %postun selinux if [ $1 -eq 0 ]; then %selinux_modules_uninstall -s %{selinuxtype} %{name} %selinux_relabel_post -s %{selinuxtype} fi %changelog ## START: Generated by rpmautospec * Sun May 19 2024 José Relvas - 9.0.0-8 - Add default configuration * Sun May 19 2024 José Relvas - 9.0.0-7 - Disable fbdev backend * Sun May 19 2024 José Relvas - 9.0.0-6 - Add "Make sure -lm is included during linking on systems" patch * Sun May 19 2024 José Relvas - 9.0.0-5 - Add MacSlow patches * Sun May 19 2024 José Relvas - 9.0.0-4 - Add "Make code sent by backspace key configurable" commit from upstream * Sun May 19 2024 José Relvas - 9.0.0-3 - Fix login transition in selinux policy * Sun May 19 2024 José Relvas - 9.0.0-2 - Fix systemd units, initial selinux policy * Sat May 18 2024 José Relvas - 9.0.0-1 - Initial Commit. ## END: Generated by rpmautospec