/[smecontribs]/rpms/bandwidthd/contribs8/bandwidthd.spec
ViewVC logotype

Contents of /rpms/bandwidthd/contribs8/bandwidthd.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sun Dec 29 08:41:32 2013 UTC (10 years, 11 months ago) by unnilennium
Branch: MAIN
CVS Tags: bandwidthd-2_0_1_1-1_el5_sme, bandwidthd-2_0_1_1-1
Initial import

1 # You can compile this without postgresql support by running:
2 # rpmbuild -ba bandwidthd.spec --without pgsql
3
4 Name: bandwidthd
5 Version: 2.0.1.1
6 Release: 1%{?dist}
7 Summary: Tracks network usage and builds html and graphs
8
9 Group: System Environment/Daemons
10 License: GPL+
11 URL: http://bandwidthd.sourceforge.net/
12 Source0: bandwidthd-2.0.1.1.tgz
13 Source1: %{name}
14 Patch0: bandwidthd-destdir.patch
15 Patch1: bandwidthd-pgsql.patch
16 Patch2: bandwidthd-mysql.patch
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18 BuildRequires: autoconf, gd-devel, libpng-devel
19 %{?!_without_pgsql:BuildRequires: postgresql-devel}
20 %if "0%{?dist}" == "0.el4" || "0%{?dist}" == "0.RHL4"
21 BuildRequires: libpcap
22 %else
23 BuildRequires: libpcap-devel
24 %endif
25 BuildRequires: bison, flex
26 BuildRequires: mysql-devel
27 Requires(post): /sbin/chkconfig
28 Requires(preun):/sbin/chkconfig
29 Requires(preun):/sbin/service
30
31 %description
32 Bandwidthd is a UNIX daemon/Windows service for graphing the traffic
33 generated by each machine on several configurable subnets. It is much
34 easier to configure than MRTG, and provides significantly more useful
35 information. MRTG only tells you how much bandwidth you are using,
36 Bandwidthd tells you that, and who is using it.
37
38 Each IP address that has moved any significant volume of traffic has its
39 own graph. The graphs are color coded to help you figure out at a glance
40 if your user is surfing the web, or surfing Kazaa.
41
42 Bandwidthd is targeted to run on my routing platforms. It is very low
43 overhead. Easily graphing small business traffic on a 133Mhz Elan 486
44 every 2.5 minutes. My entire ISP (2000-3000 IP addresses across 4 states)
45 is graphed on a Celeron 450 every 10 minutes.
46
47
48 %prep
49 %setup -q
50 %patch0 -p1
51 #-b .dest
52 %patch1 -p0
53 #-b .pgsql
54 %patch2 -p1
55 #-b .mysql
56
57 %build
58 cp -af /usr/lib/rpm/config.{sub,guess} .
59 autoheader
60 autoconf
61 %configure --prefix=%{_prefix} \
62 --exec_prefix=%{_prefix} \
63 --sysconfdir=%{_sysconfdir} \
64 --bindir=%{_bindir} \
65 --localstatedir=%{_var}/www\
66 --datadir=%{_var}/www
67 make %{?_smp_mflags}
68
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 make install DESTDIR=$RPM_BUILD_ROOT
73 # init script
74 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
75 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/
76 # install apache configuration
77 install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
78 echo "Alias /%{name} %{_var}/www/%{name}/htdocs" \
79 > $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
80 # remove execute bit for gif and sh script without #!
81 chmod -x phphtdocs/*.gif
82
83 # prepare for mysql
84 #cp phphtdocs/*.php phphtdocs/*.conf phphtdocs/*.sh $RPM_BUILD_ROOT/var/www/%{name}/htdocs/
85 cp -a phphtdocs $RPM_BUILD_ROOT/var/www/%{name}/
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90
91 %post
92 /sbin/chkconfig --add bandwidthd
93
94 %preun
95 if [ $1 = 0 ]; then
96 /sbin/service bandwidthd stop > /dev/null 2>&1
97 /sbin/chkconfig --del bandwidthd
98 fi
99
100
101 %files
102 %defattr(-,root,root,-)
103 %doc README CHANGELOG TODO
104 %{?!_without_pgsql:%doc phphtdocs}
105 %attr(755,admin,www) %{_var}/www/%{name}/phphtdocs/*.php
106 %attr(755,admin,www) %{_var}/www/%{name}/phphtdocs/*.conf
107 %config(noreplace) %{_sysconfdir}/%{name}.conf
108 %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
109 %attr(755,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
110 %{_sbindir}/%{name}
111 %dir %{_var}/www/%{name}
112 %{_var}/www/%{name}/*
113 %attr(755,root,root) %{_var}/www/%{name}/phphtdocs/*.sh
114
115 %changelog
116 * Sat Mar 12 2011 JP Pialasse <tests@pialasse.com> - 2.0.1.1-1
117 - updated to CVS on 2005 sep 26 with mysql support patch
118 - added back autoconf and autoheader
119 - cond buid for rhel4
120
121 * Sun Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-11
122 - updated config.sub and config.guess to build on ppc64
123 - added libpng-devel again (required for EPEL-4)
124
125 * Sat Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-8
126 - removed dependency on gd
127 - removed one line of autoconf
128 - removed dependency on libpng-devel
129 - phphtdocs added for pgsql build, execute bit for gif and sh removed
130
131 * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-7
132 - changed License to GPL+
133
134 * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-6
135 - buildroot macro replaced by RPM_BUILD_ROOT variable
136 - added autoconf into build-requires
137 - by default compiled with postgresql support
138 - conditional build without postgresql (--without pgsql)
139 - libpng removed from requires
140
141 * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-5
142 - conditional build for el4
143
144 * Sun Sep 9 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-4
145 - updated license and summary
146 - changed init script permissions
147
148 * Tue Mar 13 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
149 - updated from version by Michal Ambroz <rebus@seznam.cz>
150 - added apache configuration script
151 - moved into /var/www/bandwidthd
152 - spec file name typo fixed

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed