-
Notifications
You must be signed in to change notification settings - Fork 18
/
ipfixprobe.spec.in
147 lines (122 loc) · 3.35 KB
/
ipfixprobe.spec.in
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
%bcond_with ndp
%bcond_with pcap
%bcond_without raw
%bcond_with nemea
%bcond_with unwind
%bcond_with is_el7
%if %{with ndp}
%global compile_ndp yes
%else
%global compile_ndp no
%endif
%if %{with pcap}
%global compile_pcap yes
%else
%global compile_pcap @COPRRPM@
%endif
%if %{with raw}
%global compile_raw yes
%else
%global compile_raw no
%endif
%if %{with nemea}
%global compile_nemea yes
%else
%global compile_nemea @COPRRPM@
%endif
%if %{with unwind}
%global compile_unwind yes
%else
%global compile_unwind @COPRRPM@
%endif
%if "%{dist}" == ".el7"
%global is_el7 yes
%else
%global is_el7 no
%endif
# Hotfix to allow RPM build on fedora36+
# There is a problem in configure autodetection when
# LDFLAGS=-specs=/usr/lib/rpm/redhat/redhat-hardened-ld
%undefine _auto_set_build_flags
Name: ipfixprobe
Version: @PACKAGE_VERSION@
Release: @RELEASE@
URL: http://nemea.liberouter.org/
Source: https://www.liberouter.org/repo/SOURCES/%{name}-%{version}-%{release}.tar.gz
Group: Liberouter
License: BSD
Vendor: CESNET, z.s.p.o.
Packager: @USERNAME@ <@USERMAIL@>
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Summary: IPFIX flow exporter with various extending IPFIX elements exported by plugins.
Requires: libatomic fuse3 telemetry lz4
BuildRequires: gcc gcc-c++ make doxygen pkgconfig libatomic telemetry lz4-devel
Provides: ipfixprobe
%if %{with ndp}
Requires: netcope-common
BuildRequires: netcope-common
%else
Requires: libpcap
BuildRequires: libpcap-devel
%endif
%if %{with nemea} || "@COPRRPM@" == "yes"
Requires: libtrap
BuildRequires: libtrap-devel
BuildRequires: unirec
%endif
%if %{with unwind} || "@COPRRPM@" == "yes"
Requires: libunwind
BuildRequires: libunwind-devel
%endif
%if "%{is_el7}" == "yes"
Requires: openssl11
BuildRequires: openssl11-devel
%else
Requires: openssl
BuildRequires: openssl-devel
%endif
%description
This package contains nemea flow exporter.
%prep
%setup
%build
./configure -q --enable-silent-rules --prefix=%{_prefix} --libdir=%{_libdir} --bindir=%{_bindir} --sysconfdir=%{_sysconfdir} --docdir=%{_docdir} --mandir=%{_mandir} --datadir=%{_datadir} --with-ndp=%{compile_ndp} --with-raw=%{compile_raw} --with-pcap=%{compile_pcap} --with-nemea=%{compile_nemea} --with-unwind=%{compile_unwind} --enable-legacy-ssl=%{is_el7};
make clean
make -j5
%install
make -j5 DESTDIR=$RPM_BUILD_ROOT install
%post
test -x %{_bindir}/ipfixprobe && setcap "CAP_NET_RAW+eip" %{_bindir}/ipfixprobe || true
ldconfig
%if %{with ndp}
%package devel
Summary: Devel package of ipfixprobe containing header files of libndpRI interface and devel files.
Group: Liberouter
Requires: ipfixprobe = %{version}-%{release}
Provides: ipfixprobe-devel
%description devel
This package contains header file for liburfilter.
%endif
%files
%attr(0755, root, nemead) %{_bindir}/ipfixprobe
%attr(0755, root, nemead) %{_bindir}/ipfixprobe_stats
%attr(0755, root, nemead) %{_bindir}/ipfixprobed
%{_sysconfdir}/bash_completion.d/ipfixprobe.bash
%{_sysconfdir}/ipfixprobe/link0.conf.example
%{_sysconfdir}/ipfixprobe/dpdk_direct.conf.example
%{_sysconfdir}/ipfixprobe/dpdk_mring.conf.example
%{_docdir}/ipfixprobe/README.md
%if %{with ndp}
%{_libdir}/libndpRI.so.0
%{_libdir}/libndpRI.so.0.0.0
%endif
@systemdsystemunitdir@
%if %{with ndp}
%files devel
%{_includedir}/ndpheader.h
%{_includedir}/ndpreader.h
%{_includedir}/ndpreader.hpp
%{_libdir}/libndpRI.a
%{_libdir}/libndpRI.la
%{_libdir}/libndpRI.so
%endif