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