Package Effector for Arch and give it a desktop entry

packaging/arch/PKGBUILD builds the tagged release from this repository
and installs it with pacman; the version test keeps its pkgver in step
with CMakeLists.txt. A desktop entry puts the interface in the app menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Si
2026-09-26 10:22:18 +02:00
co-authored by Claude Opus 5.5
parent b9f905e04c
commit 520c7c45fb
9 changed files with 75 additions and 2 deletions
+2
View File
@@ -3,6 +3,8 @@
add_executable(effector_tests core_tests.cpp ../src/cli/options.cpp)
target_link_libraries(effector_tests PRIVATE effector_core)
target_compile_options(effector_tests PRIVATE -Wall -Wextra -Wpedantic)
# The version test reads the Arch PKGBUILD to keep its pkgver in step.
target_compile_definitions(effector_tests PRIVATE EFFECTOR_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
add_test(NAME core COMMAND effector_tests)
+7
View File
@@ -1725,6 +1725,13 @@ int main() {
check(newest != std::string_view::npos &&
log.substr(newest + 5).starts_with(std::string(kVersion) + "]"),
"the newest changelog entry is this version");
std::ifstream pkgbuild(std::string(EFFECTOR_SOURCE_DIR) + "/packaging/arch/PKGBUILD");
std::string line;
std::string pkgver;
while (std::getline(pkgbuild, line)) {
if (line.starts_with("pkgver=")) pkgver = line.substr(7);
}
check(pkgver == kVersion, "the Arch PKGBUILD packages this version");
const auto options = parsedOptions({"--version"});
check(options && options->showVersion, "--version is understood");
const auto shortOptions = parsedOptions({"-V"});