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

Annotation of /rpms/bandwidthd/contribs9/bandwidthd.spec

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


Revision 1.1 - (hide annotations) (download)
Sat Sep 19 08:49:59 2015 UTC (8 years, 8 months ago) by stephdl
Branch: MAIN
Initial import to sme9

1 stephdl 1.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: 2%{?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     * Sun Dec 29 2013 JP Pialasse <tests@pialasse.com> - 2.0.1.1-2
117     - adapted for SME8
118     - initial import
119    
120     * Sat Mar 12 2011 JP Pialasse <tests@pialasse.com> - 2.0.1.1-1
121     - updated to CVS on 2005 sep 26 with mysql support patch
122     - added back autoconf and autoheader
123     - cond buid for rhel4
124    
125     * Sun Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-11
126     - updated config.sub and config.guess to build on ppc64
127     - added libpng-devel again (required for EPEL-4)
128    
129     * Sat Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-8
130     - removed dependency on gd
131     - removed one line of autoconf
132     - removed dependency on libpng-devel
133     - phphtdocs added for pgsql build, execute bit for gif and sh removed
134    
135     * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-7
136     - changed License to GPL+
137    
138     * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-6
139     - buildroot macro replaced by RPM_BUILD_ROOT variable
140     - added autoconf into build-requires
141     - by default compiled with postgresql support
142     - conditional build without postgresql (--without pgsql)
143     - libpng removed from requires
144    
145     * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-5
146     - conditional build for el4
147    
148     * Sun Sep 9 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-4
149     - updated license and summary
150     - changed init script permissions
151    
152     * Tue Mar 13 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
153     - updated from version by Michal Ambroz <rebus@seznam.cz>
154     - added apache configuration script
155     - moved into /var/www/bandwidthd
156     - spec file name typo fixed

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