>From 87076910fdf16a03447cfcaf20d3d82d79f27115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx> Date: Fri, 3 Apr 2015 14:33:49 +0200 Subject: Move RRDs back-end into perl-Log-Log4perl-Appender-RRDs sub-package diff --git a/perl-Log-Log4perl.spec b/perl-Log-Log4perl.spec index 94f06a9..4771ce8 100644 --- a/perl-Log-Log4perl.spec +++ b/perl-Log-Log4perl.spec @@ -1,12 +1,15 @@ +%bcond_without RRD + Name: perl-Log-Log4perl Version: 1.46 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Log4j implementation for Perl Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/Log-Log4perl/ Source0: http://www.cpan.org/authors/id/M/MS/MSCHILLI/Log-Log4perl-%{version}.tar.gz BuildArch: noarch +BuildRequires: perl(Config) BuildRequires: perl(ExtUtils::MakeMaker) # Run-time: BuildRequires: perl(base) @@ -31,7 +34,9 @@ BuildRequires: perl(Log::Dispatch::FileRotate) >= 1.10 BuildRequires: perl(Log::Dispatch::Screen) BuildRequires: perl(Log::Dispatch::Syslog) BuildRequires: perl(POSIX) +%if %{with RRD} BuildRequires: perl(RRDs) +%endif BuildRequires: perl(Storable) BuildRequires: perl(strict) # Term::ANSIColor is not needed for runing tests @@ -39,7 +44,6 @@ BuildRequires: perl(vars) BuildRequires: perl(warnings) BuildRequires: perl(XML::DOM) # Tests -BuildRequires: perl(Config) BuildRequires: perl(fields) BuildRequires: perl(Filter::Util::Call) BuildRequires: perl(FindBin) @@ -61,10 +65,26 @@ Log::Log4perl lets you remote-control and fine-tune the logging behavior of your system from the outside. It implements the widely popular (Java-based) Log4j logging package in pure Perl. +To log into RRD database, install perl-Log-Log4perl-Appender-RRDs package. + +%if %{with RRD} +%package Appender-RRDs +Summary: Log to a RRDtool archive +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: %{name} = %{version}-%{release} +Conflicts: %{name} < 1.46-2 + +%description Appender-RRDs +Log::Log4perl::Appender::RRDs appender facilitates writing data to +RRDtool round-robin archives via Log4perl. +%endif + + %prep %setup -q -n Log-Log4perl-%{version} -find lib -name "*.pm" -exec chmod -c a-x {} + -perl -pi -e 's|^#!/usr/local/bin/perl|#!%{__perl}|' eg/newsyslog-test eg/benchmarks/simple +find lib -name '*.pm' -exec chmod -c a-x {} + +perl -MConfig -pi -e 's|^#!/usr/local/bin/perl|$Config{startperl}|' \ + eg/newsyslog-test eg/benchmarks/simple %build perl Makefile.PL INSTALLDIRS=vendor @@ -80,13 +100,26 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} ';' make test %files -%doc Changes LICENSE README +%license LICENSE +%doc Changes README %{perl_vendorlib}/* +%exclude %{perl_vendorlib}/Log/Log4perl/Appender/RRDs.pm %{_mandir}/man1/* %{_mandir}/man3/* +%exclude %{_mandir}/man3/Log::Log4perl::Appender::RRDs.* %{_bindir}/* +%if %{with RRD} +%files Appender-RRDs +%{perl_vendorlib}/Log/Log4perl/Appender/RRDs.pm +%{_mandir}/man3/Log::Log4perl::Appender::RRDs.* +%endif + %changelog +* Fri Apr 03 2015 Petr Pisar <ppisar@xxxxxxxxxx> - 1.46-2 +- Modernize spec file +- Move RRDs back-end into perl-Log-Log4perl-Appender-RRDs sub-package + * Mon Nov 03 2014 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 1.46-1 - 1.46 bump -- cgit v0.10.2 http://pkgs.fedoraproject.org/cgit/perl-Log-Log4perl.git/commit/?h=master&id=87076910fdf16a03447cfcaf20d3d82d79f27115 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel