mrtg/mrtg.spec
cvsdist 71e1281574 auto-import changelog data from mrtg-2.9.17-7.src.rpm
Wed May 29 2002 Chip Turner <cturner@redhat.com>
- added filter for soft perl dependencies
Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild
Fri May 17 2002 Nalin Dahyabhai <nalin@redhat.com> 2.9.17-4
- rebuild in new environment
2004-09-09 08:48:09 +00:00

235 lines
6.7 KiB
RPMSpec

%define contentdir /var/www/html/%{name}
Summary: Multi Router Traffic Grapher
Name: mrtg
Version: 2.9.17
Release: 7
URL: http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
Source0: http://www.ee.ethz.ch/~oetiker/webtools/mrtg/pub/%{name}-%{version}.tar.gz
Source1: mrtg.cfg
Source2: README-14allcgi
Source3: 14all.cgi
Source4: filter-requires-mrtg.sh
License: GPL
Group: Applications/Internet
Requires: perl >= 5.004
Requires: gd
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildPrereq: freetype-devel, gd-devel, libjpeg-devel, libpng-devel
%define __find_requires %{SOURCE4}
%description
The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic
load on network-links. MRTG generates HTML pages containing PNG
images which provide a LIVE visual representation of this traffic.
%prep
%setup -q
%build
LIBS="-lgd -lpng -lz -lfreetype"; export LIBS
%configure
make
find contrib -type f -exec /usr/bin/perl -e 's,^#!/.*,#!%{__perl},gi' -p -i \{\} \;
find contrib -name "*.pl" -exec perl -e 's;\015;;gi' -p -i \{\} \;
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/mrtg
mkdir -p $RPM_BUILD_ROOT%{contentdir}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mrtg2/Pod
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m 644 images/* $RPM_BUILD_ROOT%{contentdir}/
install -m 644 doc/*.html $RPM_BUILD_ROOT%{contentdir}/
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/mrtg
perl -e 's|\@WORKDIR@|%{contentdir}|g' -pi $RPM_BUILD_ROOT/etc/mrtg/mrtg.cfg
install -m 644 %{SOURCE2} contrib/14all/README
install -m 755 %{SOURCE3} contrib/14all
for i in bin/mrtg bin/rateup bin/cfgmaker bin/indexmaker; do
install -m 755 -c $i $RPM_BUILD_ROOT%{_bindir}/
done
for i in lib/mrtg2/*.pm; do
install -m 644 $i $RPM_BUILD_ROOT%{_libdir}/mrtg2/
done
for i in lib/mrtg2/Pod/*.pm; do
install -m 644 $i $RPM_BUILD_ROOT%{_libdir}/mrtg2/Pod/
done
for i in doc/*.1; do
install -m 644 $i $RPM_BUILD_ROOT%{_mandir}/man1/
done
%post
if ! grep '* * * * root %{_bindir}/mrtg' /etc/crontab > /dev/null; then
echo "" >> /etc/crontab
echo "0-59/5 * * * * root %{_bindir}/mrtg %{_sysconfdir}/mrtg/mrtg.cfg" >> /etc/crontab
fi
%postun
if [ $1 = 0 ]; then
grep -v '* * * * root %{_bindir}/mrtg' /etc/crontab > /etc/crontab.new &&\
cat /etc/crontab.new > /etc/crontab &&
rm /etc/crontab.new
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc contrib ANNOUNCE CHANGES COPYING COPYRIGHT MANIFEST README THANKS
%dir %{_sysconfdir}/mrtg
%config(noreplace) %{_sysconfdir}/mrtg/mrtg.cfg
%{contentdir}
%{_bindir}/*
%{_libdir}/mrtg2
%{_mandir}/*/*
%changelog
* Wed May 29 2002 Chip Turner <cturner@redhat.com>
- added filter for soft perl dependencies
* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Fri May 17 2002 Nalin Dahyabhai <nalin@redhat.com> 2.9.17-4
- rebuild in new environment
* Fri Feb 22 2002 Nalin Dahyabhai <nalin@redhat.com> 2.9.17-3
- rebuild
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Wed Nov 1 2001 Nalin Dahyabhai <nalin@redhat.com> 2.9.17-1
- update to 2.9.17
- use FHS macros
- install the .gif files as well
- copyright: distributable -> license: GPL
* Tue Jul 3 2001 Tim Powers <timp@redhat.com>
- changed description to indicate that it creates PNG images and not GIF images
* Mon Jun 25 2001 Nalin Dahyabhai <nalin@redhat.com>
- set LIBS=-lfreetype and LDFLAGS="-lgd -lpng -lfreetype -lm" to link the gd
support with freetype, which it needs
- remove Packager: tag (was Packager: Tim Verhoeven <dj@sin.khk.be>)
* Mon May 21 2001 Tim Powers <timp@redhat.com>
- rebuilt for the distro
* Mon Mar 5 2001 Tim Powers <timp@redhat.com>
- fixed bad group
* Thu Dec 14 2000 Tim Powers <timp@redhat.com>
- updated to 2.9.6
* Tue Dec 12 2000 Tim Powers <timp@redhat.com>
- updated to 2.9.5
* Mon Nov 20 2000 Tim Powers <timp@redhat.com>
- rebuilt to fix bad dir perms
* Mon Nov 13 2000 Tim Powers <timp@redhat.com>
- using this new spec for 7.1 build
* Fri Oct 27 2000 Henri Gomez <hgomez@slib.fr>
[2.9.4]
- compiled on Redhat 6.1 box plus updates with rpm-3.0.5
* Thu Oct 26 2000 Henri Gomez <hgomez@slib.fr>
[2.9.2]
- clean up spec file for 2.9 release
(no .gif, cfgmaker_ip removed)
- mrtg 2.9 look for .pm in /usr/lib/mrtg2, so no more need
to relocate .pm at post time.
- mrtg config (mrtg.cfg) goes now in /etc/mrtg/
- added manual to rpm
- spec file adapted to RH 7.0
* Wed Feb 9 2000 Tim Verhoeven <dj@sin.khk.be>
[2.8.12]
- source archiv changed back to .gz
- upgraded to mrtg version 2.8.12
* Sat Nov 13 1999 Peter Hanecak <hanecak@megaloman.sk>
[2.8.9]
- source archiv changed to .bz2
* Fri Aug 27 1999 Henri Gomez <gomez@slib.fr>
[2.8.8]
- important release since rrd support is added
It came from Rainer Bawidamann work. If you have rrdtool RPM
installed, just add UseRRDTool: Yes in your config files.
- added latest patch for mrtg-rrd.
- to convert your mrtg logs to rrd format, use log2rrd.pl
you can found on rrdtool package.
* Mon Aug 16 1999 Henri Gomez <gomez@slib.fr>
[2.8.6]
* Fri Jul 23 1999 Henri Gomez <gomez@slib.fr>
[2.8.4]
- mrtg could use now png instead of gif via gd1.6.1
but since gd1.6.1 remove all gif reference it could
break your dependencies, so we don't use it for now.
* Tue Jun 15 1999 Henri Gomez <gomez@slib.fr>
[2.7.5]
- removed gd-devel requires, RH5.x use libgd-devel and RH6 gd-devel.
- removed CR from perl files in contrib.
- added cfgmaker_ip in binaries.
- rework modules install/de-install for RH5.x/6.0 compat
* Wed Jun 9 1999 Henri Gomez <gomez@slib.fr>
[2.7.4-2]
- set perl path for contribs
- set SNMP's perl to /usr/lib/perl5/site_perl (clean for RH5.x and RH6.0)
* Wed May 5 1999 Ian Macdonald <ianmacd@xs4all.nl>
[2.7.4-1]
- changed Perl module installation to be version independent
- changed libgd dependency to gd
- changed URL
- strip binaries
- include contrib directory as documentation
* Tue Mar 2 1999 Henri Gomez <gomez@slib.fr>
[2.6.6]
* Wed Feb 17 1999 Henri Gomez <gomez@slib.fr>
[2.6.4]
- removed mrtg-squid (specific OIDS)
- cfgmaker and indexmaker now /usr/bin
- libgd must be >= 1.3
* Fri Jan 29 1999 Henri Gomez <gomez@slib.fr>
[2.5.4c-3]
- Added mrtg-squid to monitor squid (specific OIDS)
* Fri Jan 28 1999 Henri Gomez <gomez@slib.fr>
[2.5.4c-2]
- applied squid snmp patch
* Wed Jan 27 1999 Henri Gomez <gomez@slib.fr>
[2.5.4c-1]
- upgraded to 2.5.4c.
- added require libgd-devel
* Mon Nov 30 1998 Arne Coucheron <arneco@online.no>
[2.5.4a-1]
* Thu Jun 18 1998 Arne Coucheron <arneco@online.no>
[2.5.3-1]
- using %%{name} and %%{version} macros
- using %defattr macro in filelist
- using install -d in various places instead of cp
- added -q parameter to %setup
- removed older changelogs