# # spec file for package perl-File-Write-Rotate # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: perl-File-Write-Rotate Version: 0.31 Release: 0 %define cpan_name File-Write-Rotate Summary: Write to files that archive/rotate themselves License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/File-Write-Rotate/ Source0: http://www.cpan.org/authors/id/P/PE/PERLANCAR/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(File::Flock::Retry) BuildRequires: perl(File::Slurper) BuildRequires: perl(File::chdir) BuildRequires: perl(IO::Compress::Gzip) BuildRequires: perl(Monkey::Patch::Action) BuildRequires: perl(Proc::PID::File) BuildRequires: perl(Taint::Runtime) BuildRequires: perl(Test::Exception) >= 0.310000 BuildRequires: perl(Test::More) >= 0.98 BuildRequires: perl(Test::Warnings) >= 0.014 BuildRequires: perl(tainting) >= 0.01 Requires: perl(File::Flock::Retry) Requires: perl(IO::Compress::Gzip) Requires: perl(Proc::PID::File) %{perl_requires} %description This module can be used to write to file, usually for logging, that can rotate itself. File will be opened in append mode. By default, locking will be done to avoid conflict when there are multiple writers. Rotation can be done by size (after a certain size is reached), by time (daily/monthly/yearly), or both. I first wrote this module for logging script STDERR output to files (see Tie::Handle::FileWriteRotate). %prep %setup -q -n %{cpan_name}-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} %check %{__make} test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes LICENSE README %changelog