From 9afb96d8f80b2bbf15a674eee3e0022b0d30c6a5 Mon Sep 17 00:00:00 2001 From: Miloslav Trmac Date: Wed, 6 Dec 2006 12:17:08 +0000 Subject: [PATCH] - Update to mrtg-2.15.0 - Don't use Prereq: for /sbin/service - Use (sed -i) instead of perl to make the regexps more readable --- .cvsignore | 4 ++-- mrtg-2.15.0-lib64.patch | 47 +++++++++++++++++++++++++++++++++++++++++ mrtg.spec | 18 +++++++++++----- sources | 4 ++-- 4 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 mrtg-2.15.0-lib64.patch diff --git a/.cvsignore b/.cvsignore index 547a2e7..731a179 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -mrtg-2.14.7.tar.gz -mrtg-2.14.7.tar.gz.md5.pgp +mrtg-2.15.0.tar.gz +mrtg-2.15.0.tar.gz.md5.pgp diff --git a/mrtg-2.15.0-lib64.patch b/mrtg-2.15.0-lib64.patch new file mode 100644 index 0000000..004a29a --- /dev/null +++ b/mrtg-2.15.0-lib64.patch @@ -0,0 +1,47 @@ +Blech, give us a relatively simple way to drop in "lib" or "lib64", as +appropriate. Needs fixing to be more correct. + +--- mrtg-2.15.0/bin/cfgmaker.lib64 2006-12-06 01:10:06.000000000 +0100 ++++ mrtg-2.15.0/bin/cfgmaker 2006-12-06 12:35:16.000000000 +0100 +@@ -44,7 +44,7 @@ + + use FindBin; + use lib "${FindBin::Bin}"; +-use lib "${FindBin::Bin}${main::SL}..${main::SL}lib${main::SL}mrtg2"; ++use lib "${FindBin::Bin}${main::SL}..${main::SL}@@lib@@${main::SL}mrtg2"; + + use MRTG_lib "2.100015"; + use Getopt::Long; +--- mrtg-2.15.0/bin/mrtg-traffic-sum.lib64 2006-12-06 12:37:19.000000000 +0100 ++++ mrtg-2.15.0/bin/mrtg-traffic-sum 2006-12-06 12:38:18.000000000 +0100 +@@ -23,7 +23,7 @@ + + use FindBin; + use lib "${FindBin::Bin}"; +-use lib "${FindBin::Bin}${main::SL}..${main::SL}lib${main::SL}mrtg2"; ++use lib "${FindBin::Bin}${main::SL}..${main::SL}@@lib@@${main::SL}mrtg2"; + use MRTG_lib "2.090017"; + use POSIX qw(mktime); + +--- mrtg-2.15.0/bin/indexmaker.lib64 2006-12-06 01:10:06.000000000 +0100 ++++ mrtg-2.15.0/bin/indexmaker 2006-12-06 12:35:16.000000000 +0100 +@@ -48,7 +48,7 @@ + + use FindBin; + use lib "${FindBin::Bin}"; +-use lib "${FindBin::Bin}${main::SL}..${main::SL}lib${main::SL}mrtg2"; ++use lib "${FindBin::Bin}${main::SL}..${main::SL}@@lib@@${main::SL}mrtg2"; + + use MRTG_lib "2.100016"; + use Getopt::Long; +--- mrtg-2.15.0/bin/mrtg.lib64 2006-12-06 01:10:06.000000000 +0100 ++++ mrtg-2.15.0/bin/mrtg 2006-12-06 12:35:16.000000000 +0100 +@@ -81,7 +81,7 @@ + + use FindBin; + use lib "${FindBin::Bin}"; +-use lib "${FindBin::Bin}${main::SL}..${main::SL}lib${main::SL}mrtg2"; ++use lib "${FindBin::Bin}${main::SL}..${main::SL}@@lib@@${main::SL}mrtg2"; + use Getopt::Long; + use Math::BigFloat; + diff --git a/mrtg.spec b/mrtg.spec index f20d047..94528d6 100644 --- a/mrtg.spec +++ b/mrtg.spec @@ -5,7 +5,7 @@ Summary: Multi Router Traffic Grapher Name: mrtg -Version: 2.14.7 +Version: 2.15.0 Release: 1 URL: http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/ Source0: http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub/mrtg-%{version}.tar.gz @@ -14,11 +14,13 @@ Source2: mrtg.cfg Source3: filter-requires-mrtg.sh Source4: mrtg.crond.in Source5: mrtg-httpd.conf -Patch0: mrtg-2.14.7-lib64.patch +Patch0: mrtg-2.15.0-lib64.patch Patch1: mrtg-2.10.5-norpath.patch License: GPL Group: Applications/Internet -PreReq: vixie-cron, /sbin/service +PreReq: vixie-cron +Requires(post): /sbin/service +Requires(postun): /sbin/service Requires: perl-Socket6 perl-IO-Socket-INET6 Buildroot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gd-devel, libpng-devel @@ -72,11 +74,12 @@ chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/mrtg install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/mrtg.conf +# Add mrtg-traffic-sum here when upstream decides to install it for i in mrtg cfgmaker indexmaker; do - %{__perl} -pi -e 's;\@\@lib\@\@;%{_lib};g' $RPM_BUILD_ROOT%{_bindir}/$i + sed -i 's;@@lib@@;%{_lib};g' "$RPM_BUILD_ROOT"%{_bindir}/"$i" done -%{__perl} -pi -e 's;\@\@lib\@\@;%{_lib};g' $RPM_BUILD_ROOT%{_mandir}/man1/*.1 +sed -i 's;@@lib@@;%{_lib};g' "$RPM_BUILD_ROOT"%{_mandir}/man1/*.1 # Tell crond to reload its configuration. %post @@ -112,6 +115,11 @@ rm -rf $RPM_BUILD_ROOT %dir %{_localstatedir}/lock/mrtg %changelog +* Wed Dec 6 2006 Miloslav Trmac - 2.15.0-1 +- Update to mrtg-2.15.0 +- Don't use Prereq: for /sbin/service +- Use (sed -i) instead of perl to make the regexps more readable + * Tue Oct 24 2006 Miloslav Trmac - 2.14.7-1 - Update to mrtg-2.14.7 diff --git a/sources b/sources index 5f71c4d..65418bc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -12de12dc27388934ce2521af3f914f33 mrtg-2.14.7.tar.gz -3d8c40bf1c056f6618e7183f01b2a2bb mrtg-2.14.7.tar.gz.md5.pgp +3417d8d43c25f5bcdeebff70e68ccb82 mrtg-2.15.0.tar.gz +72d1f2d3731f82963f9b80cfb8cf33d9 mrtg-2.15.0.tar.gz.md5.pgp