Skip to content

Commit 4712348

Browse files
committed
add ananicy-cpp
1 parent b687cf1 commit 4712348

3 files changed

Lines changed: 48 additions & 1 deletion

File tree

build_files/50-ananicy.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/bash
2+
3+
set -ouex pipefail
4+
5+
source /ctx/build_files/build-helpers.sh
6+
7+
# Dependencies
8+
9+
pdnf install elfutils-libelf elfutils-libelf-devel libbpf libbpf-devel fmt fmt-devel spdlog spdlog-devel nlohmann-json-devel
10+
11+
# ananicy-cpp
12+
13+
git clone --recursive --depth 0 https://gitlab.com/ananicy-cpp/ananicy-cpp.git /tmp/ananicy-cpp
14+
15+
pushd /tmp/ananicy-cpp
16+
17+
cmake -S . -Bbuild \
18+
-GNinja \
19+
-DCMAKE_BUILD_TYPE=None \
20+
-DCMAKE_INSTALL_PREFIX=/usr \
21+
-DUSE_EXTERNAL_SPDLOG=ON \
22+
-DUSE_EXTERNAL_JSON=ON \
23+
-DUSE_EXTERNAL_FMTLIB=ON \
24+
-DENABLE_SYSTEMD=ON \
25+
-DUSE_BPF_PROC_IMPL=ON \
26+
-DBPF_BUILD_LIBBPF=OFF
27+
28+
cmake --build build --target ananicy-cpp
29+
30+
DESTDIR="/" cmake --install build --component Runtime
31+
32+
popd
33+
rm -rf /tmp/ananicy-cpp
34+
35+
# ananicy-rules
36+
37+
curl --no-progress-meter --retry 3 -Lo /tmp/ananicy-rules.zip https://github.com/CachyOS/ananicy-rules/archive/refs/heads/master.zip
38+
7z x -o/tmp/ /tmp/ananicy-rules.zip
39+
rm /tmp/ananicy-rules.zip
40+
mv /tmp/ananicy-rules-master /etc/ananicy.d
41+
rm -rf /etc/ananicy.d/{.github,LICENSE,README.md}
42+
43+
# Enable the service
44+
45+
systemctl enable ananicy-cpp.service

build_files/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ run_parallel \
6666
/ctx/build_files/50-beszel.sh \
6767
/ctx/build_files/50-rstudio.sh \
6868
/ctx/build_files/50-openrefine.sh \
69-
/ctx/build_files/50-arch.sh
69+
/ctx/build_files/50-arch.sh \
70+
/ctx/build_files/50-ananicy.sh
7071

7172
#### Enabling a System Unit File
7273

build_files/tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ IMPORTANT_UNITS=(
164164
btrfs-scrub.timer
165165
xfs_scrub_all.timer
166166
#duperemove-weekly@$(systemd-escape /var/home).timer
167+
ananicy-cpp.service
167168
)
168169

169170
for unit in "${IMPORTANT_UNITS[@]}"; do

0 commit comments

Comments
 (0)