- Add LANG and LC_ALL definition to cron script for easier copying to
command line (#167530) - Don't ship MANIFEST and a very obsolete version of 14all.cgi - Fix rewriting of perl paths to /usr/bin/perl in contrib scripts - Make contrib scripts unexecutable to avoid unnecessary rpm dependencies; remove unnecessary entries from filter-requires-mrtg.sh
This commit is contained in:
parent
cfd817d5e9
commit
92fcbbe528
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/lib/rpm/find-requires $* | grep -v 'perl(GD)' | grep -v 'perl(MRP::BaseClass)' | grep -v 'perl(Net::Netmask)' | grep -v 'perl(Net::Telnet)'
|
||||
/usr/lib/rpm/find-requires "$@" | grep -v 'perl(GD)' | grep -v 'perl(MRP::BaseClass)'
|
||||
|
@ -1 +1 @@
|
||||
*/5 * * * * root @bindir@/mrtg @sysconfdir@/mrtg/mrtg.cfg --lock-file @localstatedir@/lock/mrtg/mrtg_l --confcache-file @localstatedir@/lib/mrtg/mrtg.ok
|
||||
*/5 * * * * root LANG=C LC_ALL=C @bindir@/mrtg @sysconfdir@/mrtg/mrtg.cfg --lock-file @localstatedir@/lock/mrtg/mrtg_l --confcache-file @localstatedir@/lib/mrtg/mrtg.ok
|
||||
|
47
mrtg.spec
47
mrtg.spec
@ -6,15 +6,13 @@
|
||||
Summary: Multi Router Traffic Grapher
|
||||
Name: mrtg
|
||||
Version: 2.12.2
|
||||
Release: 1
|
||||
Release: 2
|
||||
URL: http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/
|
||||
Source0: http://www.ee.ethz.ch/~oetiker/webtools/mrtg/pub/%{name}-%{version}.tar.gz
|
||||
Source3: mrtg.cfg
|
||||
Source4: README-14allcgi
|
||||
Source5: 14all.cgi
|
||||
Source6: filter-requires-mrtg.sh
|
||||
Source7: mrtg.crond.in
|
||||
Source8: mrtg-httpd.conf
|
||||
Source1: mrtg.cfg
|
||||
Source2: filter-requires-mrtg.sh
|
||||
Source3: mrtg.crond.in
|
||||
Source4: mrtg-httpd.conf
|
||||
Patch0: mrtg-2.9.17-lib64.patch
|
||||
Patch1: mrtg-2.10.5-norpath.patch
|
||||
License: GPL
|
||||
@ -23,12 +21,12 @@ PreReq: vixie-cron, /sbin/service
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: gd-devel, libpng-devel
|
||||
|
||||
%define __find_requires %{SOURCE6}
|
||||
%define __find_requires %{SOURCE2}
|
||||
|
||||
%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.
|
||||
images which provide a LIVE visual representation of this traffic.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
@ -45,8 +43,10 @@ done
|
||||
# Don't link rateup statically, don't link to indirect dependencies
|
||||
# LIBS derived from autodetected by removing -Wl,-B(static|dynamic), -lpng, -lz
|
||||
make LIBS='-lgd -lm'
|
||||
find contrib -type f -exec %{__perl} -e 's,^#!/.*,#!%{__perl},gi' -p -i \{\} \;
|
||||
find contrib -type f -exec \
|
||||
%{__perl} -e 's,^#!/\s*\S*perl\S*,#!%{__perl},gi' -p -i \{\} \;
|
||||
find contrib -name "*.pl" -exec %{__perl} -e 's;\015;;gi' -p -i \{\} \;
|
||||
find contrib -type f | xargs chmod a-x
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -61,17 +61,14 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
|
||||
|
||||
install -m 644 images/* $RPM_BUILD_ROOT%{contentdir}/
|
||||
sed 's,@CONTENTDIR@,%{contentdir},g; s,@LIBDIR@,%{_localstatedir}/lib/mrtg,g' \
|
||||
%{SOURCE3} > $RPM_BUILD_ROOT%{_sysconfdir}/mrtg/mrtg.cfg
|
||||
%{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/mrtg/mrtg.cfg
|
||||
chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/mrtg/mrtg.cfg
|
||||
sed -e 's,@bindir@,%{_bindir},g; s,@sysconfdir@,%{_sysconfdir},g;' \
|
||||
-e 's,@localstatedir@,%{_localstatedir},g' %{SOURCE7} \
|
||||
-e 's,@localstatedir@,%{_localstatedir},g' %{SOURCE3} \
|
||||
> $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/mrtg
|
||||
chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/mrtg
|
||||
|
||||
install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/mrtg.conf
|
||||
|
||||
install -m 644 %{SOURCE4} contrib/14all/README
|
||||
install -m 755 %{SOURCE5} contrib/14all
|
||||
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/mrtg.conf
|
||||
|
||||
for i in mrtg cfgmaker indexmaker; do
|
||||
%{__perl} -pi -e 's;\@\@lib\@\@;%{_lib};g' $RPM_BUILD_ROOT%{_bindir}/$i
|
||||
@ -97,7 +94,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc contrib ANNOUNCE CHANGES COPYING COPYRIGHT MANIFEST README THANKS
|
||||
%doc contrib ANNOUNCE CHANGES COPYING COPYRIGHT README THANKS
|
||||
%dir %{_sysconfdir}/mrtg
|
||||
%config(noreplace) %{_sysconfdir}/mrtg/mrtg.cfg
|
||||
%config %{_sysconfdir}/cron.d/mrtg
|
||||
@ -113,6 +110,14 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%dir %{_localstatedir}/lock/mrtg
|
||||
|
||||
%changelog
|
||||
* Mon Sep 12 2005 Miloslav Trmac <mitr@redhat.com> - 2.12.2-2
|
||||
- Add LANG and LC_ALL definition to cron script for easier copying to command
|
||||
line (#167530)
|
||||
- Don't ship MANIFEST and a very obsolete version of 14all.cgi
|
||||
- Fix rewriting of perl paths to /usr/bin/perl in contrib scripts
|
||||
- Make contrib scripts unexecutable to avoid unnecessary rpm dependencies;
|
||||
remove unnecessary entries from filter-requires-mrtg.sh
|
||||
|
||||
* Mon Jun 20 2005 Miloslav Trmac <mitr@redhat.com> - 2.12.2-1
|
||||
- Update to mrtg-2.12.2
|
||||
|
||||
@ -267,7 +272,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
[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
|
||||
- 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
|
||||
@ -288,9 +293,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
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
|
||||
- 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]
|
||||
|
||||
@ -337,7 +342,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
- applied squid snmp patch
|
||||
|
||||
* Wed Jan 27 1999 Henri Gomez <gomez@slib.fr>
|
||||
[2.5.4c-1]
|
||||
[2.5.4c-1]
|
||||
- upgraded to 2.5.4c.
|
||||
- added require libgd-devel
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user