Repository navigation
Expand file tree
/
Copy pathadaptmon.spec
More file actions
107 lines (90 loc) · 2.98 KB
/
Copy pathadaptmon.spec
File metadata and controls
107 lines (90 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Name: adaptmon
Source0: %{name}.tar.gz
Source1: %{name}.git-version
%if 0%{?builddep_only}
%global version_major 0
%global version_minor 0
%global version_patch 0
%global git_version builddep
%else
%global version_major %(tar -xOf %{SOURCE0} %{name}/CMakeLists.txt | grep -w -m1 VERSION_MAJOR | cut -d' ' -f2 | tr -cd 0-9)
%global version_minor %(tar -xOf %{SOURCE0} %{name}/CMakeLists.txt | grep -w -m1 VERSION_MINOR | cut -d' ' -f2 | tr -cd 0-9)
%global version_patch %(tar -xOf %{SOURCE0} %{name}/CMakeLists.txt | grep -w -m1 VERSION_PATCH | cut -d' ' -f2 | tr -cd 0-9)
%global git_version %(cat %{SOURCE1})
%endif
Version: %{version_major}.%{version_minor}.%{version_patch}.%{git_version}
Release: 1%{?dist}
Summary: Adaptive network monitoring libraries and tools
License: BSD-3-Clause
URL: https://gitlab.liberouter.org/monitoring/adaptmon
BuildRequires: cmake >= 3.25
BuildRequires: gcc-c++
BuildRequires: git-core
BuildRequires: make
BuildRequires: pkgconfig(libdpdk) >= 21.11
BuildRequires: pkgconfig(libpcap)
%if 0%{?rhel} == 8 || 0%{?rhel} == 9
%global gcc_toolset 14
BuildRequires: gcc-toolset-14-gcc-c++
%endif
%if 0%{?rhel} >= 10
%global gcc_toolset 15
BuildRequires: gcc-toolset-15-gcc-c++
BuildRequires: gcc-toolset-15-gcc-plugin-annobin
%endif
# disables generation of the shared "adaptmon-debuginfo" package to make it clearer which -debuginfo package is needed
%global _find_debuginfo_dwz_opts %{nil}
%description
Adaptive network monitoring libraries and command-line tools.
%package -n libamon
Summary: Core AdaptMon library
%description -n libamon
Core packet processing and utility library used by AdaptMon applications.
%package -n libamon-dpdk
Summary: DPDK support for libamon
Requires: libamon%{?_isa} = %{version}-%{release}
%description -n libamon-dpdk
DPDK integration library for libamon.
%package -n amon-tools
Summary: AdaptMon command-line tools
Requires: libamon%{?_isa} = %{version}-%{release}
%description -n amon-tools
Command-line tools based on libamon.
%prep
%autosetup -n %{name}
%build
%if 0%{?rhel} == 8 || 0%{?rhel} == 9
source /opt/rh/gcc-toolset-%{gcc_toolset}/enable
%endif
%if 0%{?rhel} >= 10
eval "$(gcc-toolset-%{gcc_toolset}-env printenv | grep gcc-toolset)"
%endif
%cmake \
-DBUILD_SHARED_LIBS=ON \
-DAMON_ENABLE_DPDK=ON \
-DAMON_ENABLE_APPS=ON \
-DAMON_ENABLE_PCAP=ON \
-DENABLE_EXAMPLES=OFF \
-DAMON_ENABLE_TESTS=OFF
%cmake_build
%install
%cmake_install
%files -n libamon
%doc README.md lib/README.md
%{_libdir}/libamon.so.0
%{_libdir}/libamon.so.0.*
%{_libdir}/libamon.so
%{_includedir}/amon/
%exclude %{_includedir}/amon/dpdk/
%files -n libamon-dpdk
%{_libdir}/libamon-dpdk.so.0
%{_libdir}/libamon-dpdk.so.0.*
%{_libdir}/libamon-dpdk.so
%{_includedir}/amon/dpdk/
%files -n amon-tools
%{_bindir}/amon-anonymizer
%{_bindir}/amon-stats
%{_bindir}/amon-receiver
%changelog
* Tue Aug 25 2026 Michal Sedlak <sedlakm@cesnet.cz> - 0.1.0-1
- Initial package