forked from CESNET/ipfixprobe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ipfixprobe.spec.in
112 lines (92 loc) · 2.5 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
%bcond_with ndp
%bcond_with nemea
%bcond_with unwind
%if %{with ndp}
%global compile_ndp yes
%else
%global compile_ndp no
%endif
%if %{with nemea}
%global compile_nemea yes
%else
%global compile_nemea @NEMEARPM@
%endif
%if %{with unwind}
%global compile_unwind yes
%else
%global compile_unwind no
%endif
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.
BuildRequires: gcc gcc-c++ make doxygen pkgconfig
Provides: ipfixprobe
%if %{with ndp}
Requires: netcope-common
BuildRequires: netcope-common
%else
Requires: libpcap
BuildRequires: libpcap-devel
%endif
%if %{with nemea} || "@NEMEARPM@" == "yes"
Requires: libtrap
BuildRequires: libtrap-devel
BuildRequires: unirec
%endif
%if %{with unwind}
Requires: libunwind
BuildRequires: libunwind-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-nemea=%{compile_nemea} --with-unwind=%{compile_unwind};
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}/ipfixprobed
%{_sysconfdir}/bash_completion.d/ipfixprobe.bash
%{_sysconfdir}/ipfixprobe/link0.conf.example
%{_docdir}/ipfixprobe/README.md
%if %{with nemea} || "@NEMEARPM@" == "yes"
%{_mandir}/man1/ipfixprobe-nemea.1*
%endif
%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