File perl-Config-YAML.spec of Package perl-Config-YAML

#
# spec file for package perl-Config-YAML (Version 1.42)
#
# Copyright (c) 2011 Stefan Jakobs <projects@localside.net>
#

%define perl_version %(eval "`perl -V:version`"; echo $version)
%define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)
%define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)

%define real_name Config-YAML

Summary:        Simple configuration automation
Name:           perl-Config-YAML
Version:        1.42
Release:        1.0
License:        Artistic/GPL
Group:          Development/Libraries/Perl   
URL:            http://search.cpan.org/dist/Config-YAML/
Source:         %{real_name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  perl-YAML
%if 0%{?suse_version}
Requires:       perl = %{perl_version}
%endif
BuildRequires:  perl-Test-Base perl-Spiffy
BuildRequires:  perl(ExtUtils::MakeMaker) 
Requires:       perl-YAML

%description
Config::YAML is a somewhat object-oriented wrapper around the YAML
module which makes reading and writing configuration files simple.
Handling multiple config files (e.g. system and per-user
configuration, or a gallery app with per-directory configuration)
is a snap.

%prep
%setup -n %{real_name}-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS="vendor"  destdir="%{buildroot}" 
%{__make} %{?_smp_mflags} OPTIMIZE="%{optflags}"

%check
%{__make} test

%install
%{__make} install
%{__rm} -rf %{buildroot}%{perl_archlib}/perllocal.pod %{buildroot}%{perl_vendorarch}/auto/*/*/.packlist

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, -)
%doc Changes README
%doc %{_mandir}/man3/*.3pm*
%dir %{perl_vendorlib}/Config/
%{perl_vendorlib}/Config/YAML.pm
%if 0%{?mandriva_version} < 201100
  %dir %{perl_vendorarch}/auto/Config/
  %{perl_vendorarch}/auto/Config/YAML
%endif

%changelog
* Thu Jun 16 2011 Stefan Jakobs <projects@localside.net> - 1.42-1
- Initial package.