### The author of ananicy-cpp # Vladislav Nepogodin ### The port maintainer for Fedora: # bieszczaders # https://copr.fedorainfracloud.org/coprs/bieszczaders/ %global debug_package %{nil} %define _disable_source_fetch 0 Name: ananicy-cpp Release: 1%{?dist} Version: 1.2.0 Summary: Rewrite of ananicy in c++ for lower cpu and memory usage License: GPLv3 URL: https://gitlab.com/ananicy-cpp/ananicy-cpp Source0: %{url}/-/archive/v%{version}/ananicy-cpp-v%{version}.tar.gz %ifarch x86_64 %global optflags %{optflags} -march=x86-64-v4 -O3 -Wno-maybe-uninitialized %endif ExcludeArch: s390x i686 ppc64le BuildRequires: git BuildRequires: nlohmann_json-devel BuildRequires: bpftool BuildRequires: clang BuildRequires: cmake BuildRequires: fmt-devel BuildRequires: json-devel BuildRequires: libbpf-devel BuildRequires: ninja-build BuildRequires: spdlog-devel BuildRequires: systemd-devel Requires: elfutils-libelf Requires: fmt Requires: glibc Requires: libbpf Requires: spdlog Requires: systemd Requires: systemd-libs Requires: zlib-ng-compat Recommends: cachyos-ananicy-rules %description Rewrite of ananicy in c++ for lower cpu and memory usage %prep %autosetup -n ananicy-cpp-v%{version} # Fix per GCC 15+ (inclusione esplicita di unistd.h per getpid) sed -i '1i#include ' src/platform/linux/process.cpp %build %cmake %cmake_build %cmake \ -GNinja \ -DENABLE_SYSTEMD=ON \ -DUSE_BPF_PROC_IMPL=ON \ -DBPF_BUILD_LIBBPF=OFF \ -DUSE_EXTERNAL_FMTLIB=ON \ -DUSE_EXTERNAL_JSON=ON \ -DUSE_EXTERNAL_SPDLOG=ON \ -DVERSION=%{version} %cmake_build --target %{name} %install %cmake_install --component Runtime %posttrans systemctl enable --now ananicy-cpp %preun systemctl disable --now ananicy-cpp %files %license LICENSE %doc README.md %{_bindir}/ananicy-cpp %{_unitdir}/ananicy-cpp.service %changelog %autochangelog/*