Skip to content

Commit 306554d

Browse files
author
Pavel Siska
committed
CMake: add init directory to CMake and spec file
1 parent c5c2677 commit 306554d

File tree

5 files changed

+32
-7
lines changed

5 files changed

+32
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ include(cmake/dependencies.cmake)
5454
add_subdirectory(external)
5555
add_subdirectory(src)
5656
add_subdirectory(pkg)
57+
add_subdirectory(init)
5758

5859
if (ENABLE_TESTS)
5960
if (NOT ENABLE_NEMEA OR NOT ENABLE_OUTPUT_UNIREC OR NOT ENABLE_INPUT_PCAP)

cmake/installation.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,11 @@ else()
3333
set(INSTALL_DIR_SHARE ${CMAKE_INSTALL_FULL_DATAROOTDIR})
3434
endif()
3535

36+
if(DEFINED SYSTEMD_UNIT_DIR)
37+
set(INSTALL_UNIT_DIR ${SYSTEMD_UNIT_DIR})
38+
else()
39+
set(INSTALL_UNIT_DIR ${CMAKE_INSTALL_PREFIX}/lib/systemd/system)
40+
endif()
41+
3642
set(INSTALL_DIR_MAN "${INSTALL_DIR_SHARE}/man/")
3743
set(INSTALL_DIR_DOC "${INSTALL_DIR_SHARE}/doc/${CMAKE_PROJECT_NAME}/")

init/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
install(FILES
2+
dpdk_direct.conf.example
3+
dpdk_mring.conf.example
4+
link0.conf.example
5+
DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/ipfixprobe
6+
)
7+
8+
install(FILES
9+
ipfixprobe-monitoring.target
10+
11+
DESTINATION ${INSTALL_UNIT_DIR}
12+
)
13+
14+
install(PROGRAMS ipfixprobed DESTINATION ${CMAKE_INSTALL_BINDIR})

init/Makefile.am

Lines changed: 0 additions & 7 deletions
This file was deleted.

pkg/rpm/ipfixprobe.spec.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
%bcond_with output_unirec
55
%bcond_with process_experimental
66

7+
%global _unitdir %{_prefix}/lib/systemd/system
8+
79
Name: ipfixprobe
810
Version: @VERSION@
911
Release: @RELEASE@%{?dist}
@@ -107,6 +109,8 @@ that make up the main components of the test environment.
107109
%files
108110
%license LICENSE
109111
%{_bindir}/ipfixprobe
112+
%{_bindir}/ipfixprobed
113+
110114
%{_libdir}/ipfixprobe/input/libipfixprobe-input-raw.so
111115

112116
%{_libdir}/ipfixprobe/output/libipfixprobe-output-ipfix.so
@@ -137,6 +141,13 @@ that make up the main components of the test environment.
137141

138142
%{_libdir}/ipfixprobe/storage/libipfixprobe-storage-cache.so
139143

144+
%{_sysconfdir}/ipfixprobe/link0.conf.example
145+
%{_sysconfdir}/ipfixprobe/dpdk_direct.conf.example
146+
%{_sysconfdir}/ipfixprobe/dpdk_mring.conf.example
147+
148+
%{_unitdir}/ipfixprobe-monitoring.target
149+
%{_unitdir}/[email protected]
150+
140151
%if %{with input_pcap}
141152
%files input-pcap
142153
%{_libdir}/ipfixprobe/input/libipfixprobe-input-pcap.so

0 commit comments

Comments
 (0)