From e49abbe9ef372b9287f157872be6cfaeca797d5f Mon Sep 17 00:00:00 2001 From: Julio Faracco Date: Wed, 13 Dec 2023 12:10:47 -0300 Subject: [PATCH 1/2] cmake: Include install section for procdump and its manpage Both binary file and the manpage are missing an install section inside CMakeLists.txt file. It is benefitial for cmake internal subcommands during the generation process. Signed-off-by: Julio Faracco --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fdb921d..91b7a642 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,6 +65,10 @@ add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/${PROCDUMP_COMPRESS_MAN} DEPENDS "${CMAKE_SOURCE_DIR}/procdump.1" ) +install(FILES ${PROJECT_BINARY_DIR}/${PROCDUMP_COMPRESS_MAN} + DESTINATION "/usr/share/man/man1/" + ) + # # Change log # @@ -289,4 +293,8 @@ add_custom_command(OUTPUT procdump_ebpf.o DEPENDS ${procdump_ebpf_SOURCE_DIR}/procdump_ebpf.c ) -set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES procdump.ebpf.o) \ No newline at end of file +set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES procdump.ebpf.o) + +install(TARGETS procdump + DESTINATION ${CMAKE_INSTALL_BINDIR} + ) From c98314c2a08d1a73d38f865b3a489efba846e7d3 Mon Sep 17 00:00:00 2001 From: Julio Faracco Date: Wed, 13 Dec 2023 12:22:12 -0300 Subject: [PATCH 2/2] spec.in: Moving old school make to cmake macros As ProcDump is using CMake now, we can take benefits of using cmake macros inside the SPEC file for example. Signed-off-by: Julio Faracco --- dist/procdump.spec.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/procdump.spec.in b/dist/procdump.spec.in index 2a79a4e9..2ea3f1ef 100644 --- a/dist/procdump.spec.in +++ b/dist/procdump.spec.in @@ -39,12 +39,12 @@ general process dump utility that you can embed in other scripts. %build -# The makefile doesn't like %%make_build (parallel make) -make CFLAGS="%{optflags}" +%cmake +%cmake_build %install -%make_install +%cmake_install %files