Blob Blame History Raw
# noarch, but to avoid debug* files interfering with manifest test:
%global debug_package %{nil}

Name:		perl-MouseX-SimpleConfig
Summary:	A Mouse role for setting attributes from a simple configfile
Version:	0.11
Release:	7%{?dist}
License:	GPL+ or Artistic
URL:		http://search.cpan.org/dist/MouseX-SimpleConfig/
Source0:	http://search.cpan.org/CPAN/authors/id/M/MJ/MJGARDNER/MouseX-SimpleConfig-%{version}.tar.gz
BuildArch:	noarch
# Module Build
BuildRequires:	perl
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.31
# Module Runtime
BuildRequires:	perl(Carp)
BuildRequires:	perl(Config::Any) >= 0.13
BuildRequires:	perl(English)
BuildRequires:	perl(Mouse) >= 0.35
BuildRequires:	perl(Mouse::Role)
BuildRequires:	perl(MouseX::ConfigFromFile) >= 0.02
BuildRequires:	perl(strict)
BuildRequires:	perl(warnings)
# Test Suite
BuildRequires:	perl(File::Find)
BuildRequires:	perl(File::Temp)
BuildRequires:	perl(lib)
BuildRequires:	perl(Path::Class::File)
BuildRequires:	perl(Test::More) >= 0.88
# Optional Tests
BuildRequires:	perl(Config::General)
BuildRequires:	perl(Test::Script)
BuildRequires:	perl(YAML::Syck)
# Author Tests (not used as code is not tidy enough)
#BuildRequires:	perl(Perl::Critic::Policy::Lax::RequireExplicitPackage::ExceptForPragmata)
#BuildRequires:	perl(Perl::Critic::Policy::Subroutines::ProhibitCallsToUndeclaredSubs)
#BuildRequires:	perl(Test::Perl::Critic)
# Release Tests
BuildRequires:	perl(Pod::Coverage::TrustPod)
BuildRequires:	perl(Test::CheckChanges)
BuildRequires:	perl(Test::ConsistentVersion)
BuildRequires:	perl(Test::CPAN::Meta)
BuildRequires:	perl(Test::DistManifest)
BuildRequires:	perl(Test::EOL)
BuildRequires:	perl(Test::HasVersion)
BuildRequires:	perl(Test::Kwalitee)
BuildRequires:	perl(Test::MinimumVersion)
BuildRequires:	perl(Test::NoTabs)
BuildRequires:	perl(Test::Pod) >= 1.41
BuildRequires:	perl(Test::Pod::Coverage) >= 1.08
BuildRequires:	perl(Test::Portability::Files)
# Disable using of Test::Vars, because it fails with Perl 5.22.0
# There is not a properly fix for it yet
%if ! 0%(perl -e 'print $] >= 5.022')
BuildRequires:	perl(Test::Vars)
%endif
# Runtime
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

%description
This role loads simple configfiles to set object attributes. It is based on the
abstract role MouseX::ConfigFromFile, and uses Config::Any to load your
configfile. Config::Any will in turn support any of a variety of different
config formats, detected by the file extension. See Config::Any for more
details about supported formats.

Like all MouseX::ConfigFromFile-derived configfile loaders, this module is
automatically supported by the MouseX::Getopt role as well, which allows
specifying -configfile on the commandline.

%prep
%setup -q -n MouseX-SimpleConfig-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
%{_fixperms} %{buildroot}

%check
make test RELEASE_TESTING=1

%files
%doc Changes LICENSE README
%{perl_vendorlib}/MouseX/
%{_mandir}/man3/MouseX::SimpleConfig.3*

%changelog
* Mon Jun 08 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.11-7
- Perl 5.22 rebuild

* Tue Jun 02 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.11-6
- Disable using of Test::Vars with Perl 5.22

* Tue Sep 02 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.11-5
- Perl 5.20 rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri Apr 25 2014 Paul Howarth <paul@city-fan.org> - 0.11-3
- perl(Test::ConsistentVersion) now available in EPEL-7 too

* Fri Apr 25 2014 Paul Howarth <paul@city-fan.org> - 0.11-2
- Incorporate fixes from package review (#1088950)
  - Add perl(File::Find) and perl(Test::Script) test dependencies
  - Drop perl(Test::Pod::Content) as it should be pulled in via
    perl(Test::ConsistentVersion) (#1091285)
  - No need to clean buildroot in %%install

* Thu Apr 17 2014 Paul Howarth <paul@city-fan.org> - 0.11-1
- Initial RPM version