forked from pool/perl-MooseX-ConfigFromFile
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-MooseX-ConfigFromFile?expand=0&rev=3
67 lines
2.1 KiB
RPMSpec
67 lines
2.1 KiB
RPMSpec
# norootforbuild
|
|
|
|
Name: perl-MooseX-ConfigFromFile
|
|
Version: 0.02
|
|
Release: 0
|
|
Summary: Abstract Moose Role for Setting Attributes from a Config File
|
|
Source: http://search.cpan.org/CPAN/authors/id/B/BL/BLBLACK/MooseX-ConfigFromFile-%{version}.tar.gz
|
|
URL: http://search.cpan.org/dist/MooseX-ConfigFromFile/
|
|
Group: Development/Libraries/Perl
|
|
License: Perl License
|
|
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
|
Requires: perl = %{perl_version}
|
|
Requires: perl(Moose) >= 0.35
|
|
Requires: perl(MooseX::Types::Path::Class) >= 0.04
|
|
BuildRequires: make perl
|
|
BuildRequires: perl(Test::More)
|
|
BuildRequires: perl(Moose) >= 0.35
|
|
BuildRequires: perl(MooseX::Types::Path::Class) >= 0.04
|
|
#!BuildIgnore: perl-MooseX-Getopt
|
|
|
|
%description
|
|
This is an abstract role which provides an alternate constructor for creating
|
|
objects using parameters passed in from a configuration file. The actual
|
|
implementation of reading the configuration file is left to concrete subroles.
|
|
|
|
It declares an attribute configfile and a class method new_with_config, and
|
|
requires that concrete roles derived from it implement the class method
|
|
get_config_from_file.
|
|
|
|
Attributes specified directly as arguments to new_with_config supercede those
|
|
in the configfile.
|
|
|
|
MooseX::Getopt knows about this abstract role, and will use it if available to
|
|
load attributes from the file specified by the commandline flag --configfile
|
|
during its normal new_with_options.
|
|
|
|
%prep
|
|
%setup -q -n "MooseX-ConfigFromFile-%{version}"
|
|
%__sed -i '/^auto_install/d' Makefile.PL
|
|
|
|
%build
|
|
%__perl Makefile.PL PREFIX="%{_prefix}"
|
|
%__make %{?jobs:-j%{jobs}}
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
|
|
%check
|
|
%__make test
|
|
|
|
%clean
|
|
%__rm -rf "%{buildroot}"
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc README ChangeLog
|
|
%dir %{perl_vendorlib}/MooseX
|
|
%{perl_vendorlib}/MooseX/ConfigFromFile.pm
|
|
%dir %{perl_vendorarch}/auto/MooseX
|
|
%{perl_vendorarch}/auto/MooseX/ConfigFromFile
|
|
%doc %{perl_man3dir}/MooseX::ConfigFromFile.%{perl_man3ext}%{ext_man}
|
|
/var/adm/perl-modules/%{name}
|
|
|
|
%changelog
|
|
# vim: set sw=4 ts=4 et nu:
|