From 3bb7bf1247c23304dfd0b8191446128783b61d74 Mon Sep 17 00:00:00 2001 From: DRAGONTOS Date: Thu, 30 May 2024 11:15:11 +0200 Subject: [PATCH] cmakelists: added cpack for rpm's --- CMakeLists.txt | 11 +++++++++++ README.md | 11 ++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc28644..1f6aae2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,19 @@ file(GLOB_RECURSE RAPID_MENU_SOURCE_FILES "src/*.cpp") # Add the executable target for RapidMenu add_executable(RapidMenu ${RAPID_MENU_SOURCE_FILES}) +install(TARGETS RapidMenu DESTINATION bin) # Find and link against the tomlplusplus library find_package(tomlplusplus REQUIRED) target_link_libraries(RapidMenu PRIVATE tomlplusplus::tomlplusplus) + +set(CPACK_PACKAGE_VENDOR "DRAGONTOS") +set(CPACK_RPM_PACKAGE_REQUIRES "tomlplusplus-devel") +set(CPACK_RPM_PACKAGE_LICENSE "GPLv3") +set(CPACK_RPM_PACKAGE_DESCRIPTION "Utilize configuration files to create runner scripts.") +set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") +set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) +set(CPACK_GENERATOR RPM) +set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") +include(CPack) diff --git a/README.md b/README.md index cbf1feb..5947193 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,21 @@ Utilize configuration files to create runner scripts. - a runner like rofi, dmenu etc # Installing -Just run this. + +From source: ``` make all sudo make install ``` +Using rpm: +``` +make all +cd build +cpack -G RPM +sudo rpm -i *.rpm +``` + # Usage ## Help message