forked from Cloudxtreme/cloudrouter-component-yaf
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathyaf.spec
132 lines (113 loc) · 3.53 KB
/
yaf.spec
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
Summary: Yet Another Flow sensor
Name: yaf
Version: 2.8.4
Release: 1%{?dist}
Group: Applications/System
License: GPL
Source: http://tools.netsa.cert.org/releases/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}
Vendor: http://tools.netsa.cert.org/
Provides: yaf
BuildRequires: autoconf
BuildRequires: gcc
BuildRequires: glib2-devel >= 2.6.4
BuildRequires: libfixbuf-devel >= 1.0.0
BuildRequires: libpcap-devel
BuildRequires: libtool-ltdl-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: pcre-devel >= 7.3
BuildRequires: pkgconfig >= 0.8
BuildRequires: zlib-devel
BuildRequires: openssl
Requires: glib2 >= 2.6.4
Requires: libfixbuf >= 1.0.0
Requires: libpcap
Requires: pcre >= 7.3
%description
YAF is Yet Another Flow sensor. It processes packet data from pcap(3) dumpfiles
as generated by tcpdump(1) or via live capture from an interface using pcap(3)
or an Endace DAG card into bidirectional flows, then exports those flows to
IPFIX Collecting Processes or in an IPFIX-based file format. YAF's output can
be used with the SiLK tools, yafscii, and super_mediator.
%package devel
Summary: Static libraries and C header files for yaf
Group: Development/NetSA
Provides: yaf-devel
Requires: %{name} = %{version}
Requires: pkgconfig >= 0.8
%description devel
Static libraries and C header files for yaf.
%prep
%setup -q -n %{name}-%{version}
%build
./configure --host=%{_host} \
--build=%{_build} \
--target=%{_target_platform} \
--program-prefix=%{?_program_prefix} \
--prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--disable-static \
--enable-plugins \
--enable-applabel
# https://fedoraproject.org/wiki/RPath_Packaging_Draft
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
%makeinstall
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d/
install --mode=0755 etc/init.d/yaf $RPM_BUILD_ROOT%{_sysconfdir}/init.d/
install --mode=0644 etc/yaf.conf $RPM_BUILD_ROOT%{_sysconfdir}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README doc/html
%{_bindir}/yaf
%{_bindir}/yafscii
%{_bindir}/yafcollect
%{_bindir}/airdaemon
%{_bindir}/filedaemon
%{_bindir}/getFlowKeyHash
%{_bindir}/yafMeta2Pcap
%{_bindir}/ipfixDump
%{_libdir}/*.so*
%{_libdir}/yaf/*.so*
%{_mandir}/*
%config(noreplace) %{_sysconfdir}/yafApplabelRules.conf
%config(noreplace) %{_sysconfdir}/yafDPIRules.conf
%config(noreplace) %{_sysconfdir}/dhcp_fingerprints.conf
%if "x" == "x1"
%config(noreplace) %{_sysconfdir}/p0f.fp
%endif
%config(noreplace) %{_sysconfdir}/yaf.conf
%attr(755,root,root) %{_sysconfdir}/init.d/yaf
%files devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/*.la
%{_libdir}/yaf/*.la
%{_libdir}/pkgconfig/*
%changelog
* Mon Oct 17 2016 John Siegrist <[email protected]> - 2.8.4-1
- Update to version 2.8.4
* Tue Dec 29 2015 John Siegrist <[email protected]> - 2.7.1-2
- Adjusted the BuildRequires dependencies for a cleaner build.
* Tue Jun 02 2015 Arun Babu Neelicattu <[email protected]> - 2.7.1-1
- Initial specfile