]>
Commit | Line | Data |
---|---|---|
fb20d4d2 | 1 | Summary: Traffic Flow Analysis Tool |
a3b05e6e | 2 | Name: cflowd |
fb20d4d2 AM |
3 | Version: 2.1.b1 |
4 | Release: 1 | |
5 | Epoch: 0 | |
a3b05e6e | 6 | License: GPL |
fb20d4d2 | 7 | Obsoletes: cflowd0-devel |
a3b05e6e | 8 | Group: Applications/Networking |
fb20d4d2 AM |
9 | Source0: ftp://ftp.caida.org/pub/cflowd/%{name}-2-1-b1.tar.gz |
10 | # Source0-md5: 6f0543390e9d46c4274f6b12b6517f62 | |
11 | Source1: %{name}.init | |
12 | Patch0: %{name}-yywrap.patch | |
a464b626 AM |
13 | # http://net.doit.wisc.edu/~plonka/cflowd/cflowd-2-1-b1-djp.patch |
14 | Patch1: http://net.doit.wisc.edu/~plonka/cflowd/cflowd-djp.patch | |
a3b05e6e | 15 | BuildRequires: arts++-devel |
fb20d4d2 AM |
16 | BuildRequires: flex |
17 | BuildRequires: bison | |
18 | BuildRequires: perl-base | |
a3b05e6e AM |
19 | URL: http://www.caida.org/tools/measurement/cflowd/ |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
fb20d4d2 AM |
22 | %define _sysconfdir /etc/%{name} |
23 | ||
a3b05e6e | 24 | %description |
fb20d4d2 AM |
25 | cflowd is a flow analysis tool currently used for analyzing Cisco's |
26 | NetFlow enabled switching method. The current release (described | |
27 | below) includes the collections, storage, and basic analysis modules | |
28 | for cflowd and for arts++ libraries. This analysis package permits | |
29 | data collection and analysis by ISPs and network engineers in support | |
30 | of capacity planning, trends analysis, and characterization of | |
31 | workloads in a network service provider environment. Other areas where | |
32 | cflowd may prove useful include usage tracking for Web hosting, | |
33 | accounting and billing, network planning and analysis, network | |
34 | monitoring, developing user profiles, data warehousing and mining, as | |
35 | well as security-related investigations. | |
36 | ||
37 | %package libs | |
38 | Summary: cflowd libraries | |
39 | Group: Libraries | |
40 | ||
41 | %description libs | |
42 | cflowd libraries. | |
43 | ||
44 | %package devel | |
45 | Summary: Header files and develpment documentation for cflowd | |
46 | Group: Development/Libraries | |
47 | Requires: %{name}-libs = %{epoch}:%{version} | |
48 | ||
49 | %description devel | |
50 | Header files and develpment documentation for cflowd. | |
51 | ||
52 | %package static | |
53 | Summary: Static cflowd libraries | |
54 | Group: Development/Libraries | |
55 | Requires: %{name} = %{epoch}:%{version} | |
56 | ||
57 | %description static | |
58 | Static cflowd libraries. | |
a3b05e6e AM |
59 | |
60 | %prep | |
61 | %setup -q -n %{name}-2-1-b1 | |
fb20d4d2 | 62 | %patch0 -p1 |
a464b626 | 63 | %patch1 -p0 |
a3b05e6e AM |
64 | |
65 | %build | |
fb20d4d2 AM |
66 | chmod u+w *.m4 configure |
67 | %{__libtoolize} | |
68 | %{__aclocal} | |
69 | %{__autoconf} | |
70 | %configure \ | |
71 | --enable-shared | |
72 | ||
73 | perl -pi -e 's#libtool#libtool --tag=CXX#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* | |
74 | perl -pi -e 's#/usr/local/arts/include/#%{_includedir}/arts++/#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* | |
75 | ||
76 | %{__make} \ | |
77 | ARTSPPINC="-I%{_includedir}/arts++" \ | |
78 | ARTSCLASSINC="-I%{_includedir}/arts++" \ | |
79 | CC="%{__cc}" \ | |
80 | CXX="%{__cxx}" | |
a3b05e6e AM |
81 | |
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
fb20d4d2 AM |
84 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/lib/cflowd} |
85 | ||
86 | perl -pi -e 's#/usr/include#\$\(includedir\)/%{name}#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile* | |
87 | perl -pi -e 's#\$\(includedir\)/%{name}/arts\+\+#/usr/include/arts\+\+#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile* | |
88 | perl -pi -e 's#/usr/lib#\$\(libdir\)#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile* | |
89 | perl -pi -e 's#/usr/bin#\$\(bindir\)#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile* | |
90 | perl -pi -e 's#/usr/sbin#\$\(sbindir\)#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile* | |
91 | perl -pi -e 's#/usr/share/man#\$\(mandir\)#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile* | |
92 | perl -pi -e 's#/etc/%{name}#\$\(sysconfdir\)#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile* | |
a3b05e6e | 93 | |
fb20d4d2 | 94 | %{makeinstall} |
a3b05e6e | 95 | |
fb20d4d2 AM |
96 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
97 | ||
98 | cp -f $RPM_BUILD_ROOT%{_sysconfdir}/cfdcollect.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/cfdcollect.conf | |
99 | cp -f $RPM_BUILD_ROOT%{_sysconfdir}/cflowd.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/cflowd.conf | |
a3b05e6e AM |
100 | |
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
fb20d4d2 AM |
104 | %post |
105 | /sbin/chkconfig --add %{name} | |
106 | if [ -f /var/lock/subsys/%{name} ]; then | |
107 | /etc/rc.d/init.d/%{name} restart 1>&2 | |
108 | else | |
109 | echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} service." | |
110 | fi | |
111 | ||
112 | %preun | |
113 | if [ "$1" = "0" ]; then | |
114 | if [ -f /var/lock/subsys/%{name} ]; then | |
115 | /etc/rc.d/init.d/%{name} stop 1>&2 | |
116 | fi | |
117 | /sbin/chkconfig --del %{name} | |
118 | fi | |
119 | ||
120 | %post libs -p /sbin/ldconfig | |
121 | %postun libs -p /sbin/ldconfig | |
122 | ||
a3b05e6e AM |
123 | %files |
124 | %defattr(644,root,root,755) | |
fb20d4d2 AM |
125 | %doc ChangeLog README doc/configuration/{*.html,*.gif} |
126 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
a3b05e6e | 127 | %attr(755,root,root) %{_bindir}/* |
fb20d4d2 AM |
128 | %attr(755,root,root) %{_sbindir}/* |
129 | %{_mandir}/man?/* | |
130 | %attr(750,root,root) %dir %{_sysconfdir} | |
131 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf | |
132 | %attr(750,root,root) /var/lib/%{name} | |
133 | ||
134 | %files libs | |
135 | %defattr(644,root,root,755) | |
136 | %attr(755,root,root) %{_libdir}/lib*.so.* | |
137 | ||
138 | %files devel | |
139 | %defattr(644,root,root,755) | |
140 | %{_includedir}/%{name} | |
141 | %attr(755,root,root) %{_libdir}/lib*.so | |
142 | %{_libdir}/lib*.la | |
143 | ||
144 | %files static | |
145 | %defattr(644,root,root,755) | |
146 | %{_libdir}/lib*.a |