]> git.pld-linux.org Git - packages/cflowd.git/blame - cflowd.spec
- builds using gcc2, init script needs to be written
[packages/cflowd.git] / cflowd.spec
CommitLineData
fb20d4d2 1Summary: Traffic Flow Analysis Tool
a3b05e6e 2Name: cflowd
fb20d4d2
AM
3Version: 2.1.b1
4Release: 1
5Epoch: 0
a3b05e6e 6License: GPL
fb20d4d2 7Obsoletes: cflowd0-devel
a3b05e6e 8Group: Applications/Networking
fb20d4d2
AM
9Source0: ftp://ftp.caida.org/pub/cflowd/%{name}-2-1-b1.tar.gz
10# Source0-md5: 6f0543390e9d46c4274f6b12b6517f62
11Source1: %{name}.init
12Patch0: %{name}-yywrap.patch
a3b05e6e 13BuildRequires: arts++-devel
fb20d4d2
AM
14BuildRequires: flex
15BuildRequires: bison
16BuildRequires: perl-base
a3b05e6e
AM
17URL: http://www.caida.org/tools/measurement/cflowd/
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
fb20d4d2
AM
20%define _sysconfdir /etc/%{name}
21
a3b05e6e 22%description
fb20d4d2
AM
23cflowd is a flow analysis tool currently used for analyzing Cisco's
24NetFlow enabled switching method. The current release (described
25below) includes the collections, storage, and basic analysis modules
26for cflowd and for arts++ libraries. This analysis package permits
27data collection and analysis by ISPs and network engineers in support
28of capacity planning, trends analysis, and characterization of
29workloads in a network service provider environment. Other areas where
30cflowd may prove useful include usage tracking for Web hosting,
31accounting and billing, network planning and analysis, network
32monitoring, developing user profiles, data warehousing and mining, as
33well as security-related investigations.
34
35%package libs
36Summary: cflowd libraries
37Group: Libraries
38
39%description libs
40cflowd libraries.
41
42%package devel
43Summary: Header files and develpment documentation for cflowd
44Group: Development/Libraries
45Requires: %{name}-libs = %{epoch}:%{version}
46
47%description devel
48Header files and develpment documentation for cflowd.
49
50%package static
51Summary: Static cflowd libraries
52Group: Development/Libraries
53Requires: %{name} = %{epoch}:%{version}
54
55%description static
56Static 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
63chmod u+w *.m4 configure
64%{__libtoolize}
65%{__aclocal}
66%{__autoconf}
67%configure \
68 --enable-shared
69
70perl -pi -e 's#libtool#libtool --tag=CXX#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile*
71perl -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
80rm -rf $RPM_BUILD_ROOT
fb20d4d2
AM
81install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/lib/cflowd}
82
83perl -pi -e 's#/usr/include#\$\(includedir\)/%{name}#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile*
84perl -pi -e 's#\$\(includedir\)/%{name}/arts\+\+#/usr/include/arts\+\+#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile*
85perl -pi -e 's#/usr/lib#\$\(libdir\)#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile*
86perl -pi -e 's#/usr/bin#\$\(bindir\)#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile*
87perl -pi -e 's#/usr/sbin#\$\(sbindir\)#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile*
88perl -pi -e 's#/usr/share/man#\$\(mandir\)#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile*
89perl -pi -e 's#/etc/%{name}#\$\(sysconfdir\)#g' Makefile* */Makefile* */*/Makefile* */*/*/Makefile* */*/*/*/Makefile*
a3b05e6e 90
fb20d4d2 91%{makeinstall}
a3b05e6e 92
fb20d4d2
AM
93install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
94
95cp -f $RPM_BUILD_ROOT%{_sysconfdir}/cfdcollect.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/cfdcollect.conf
96cp -f $RPM_BUILD_ROOT%{_sysconfdir}/cflowd.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/cflowd.conf
a3b05e6e
AM
97
98%clean
99rm -rf $RPM_BUILD_ROOT
100
fb20d4d2
AM
101%post
102/sbin/chkconfig --add %{name}
103if [ -f /var/lock/subsys/%{name} ]; then
104 /etc/rc.d/init.d/%{name} restart 1>&2
105else
106 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} service."
107fi
108
109%preun
110if [ "$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}
115fi
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
This page took 0.081828 seconds and 4 git commands to generate.