## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autochangelog ## END: Set by rpmautospec %global rustflags_debuginfo 1 %undefine _include_frame_pointers %global toolchain clang %global scheds %{shrink: scx_bpfland scx_cosmos scx_flash scx_lavd scx_rusty } Name: scx-scheds Version: 1.0.17 Release: 1%{?dist} Summary: Sched_ext Schedulers and Tools License: GPL-2.0-only URL: https://github.com/sched-ext/scx Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: scx.service Source2: scx.default BuildRequires: cargo BuildRequires: clang BuildRequires: pkgconfig(libelf) BuildRequires: rust BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel %description sched_ext is a Linux kernel feature which enables implementing kernel thread schedulers in BPF and dynamically loading them. %prep %autosetup -n scx-%{version} -p1 %build export CARGO_HOME=.cargo for sched in %{scheds}; do cargo build --locked --release -p "${sched}" done %install for sched in %{scheds}; do install -Dpm0755 target/release/"${sched}" -t %{buildroot}%{_bindir} done install -Dpm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/default/scx install -Dpm644 %{SOURCE1} %{buildroot}%{_unitdir}/scx.service echo 'enable scx.service' | install -Dpm0644 /dev/stdin %{buildroot}%{_presetdir}/70-%{name}.preset sed -i 's/\(List of scx_schedulers:\).*/\1 %{scheds}/' %{buildroot}%{_sysconfdir}/default/scx %post %systemd_post scx.service %preun %systemd_preun scx.service %postun %systemd_postun_with_restart scx.service %files %config(noreplace) %{_sysconfdir}/default/scx %{_bindir}/scx* %{_presetdir}/70-%{name}.preset %{_unitdir}/scx.service %changelog ## START: Generated by rpmautospec * Tue Oct 07 2025 John Doe - 1.0.17-1 - Uncommitted changes ## END: Generated by rpmautospec