yum install rpm-build
yum install redhat-rpm-config
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
####
%{!?perl_vendorlib: %define perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)}
Name: perl-Log-Any
Version: 0.15
Release: 1%{?dist}
Summary: Bringing loggers and listeners together
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Log-Any/
Source0: http://www.cpan.org/modules/by-module/Log/Log-Any-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::More)
%description
Log::Any allows CPAN modules to safely and efficiently log messages, while
letting the application choose (or decline to choose) a logging mechanism
such as Log::Dispatch or Log::Log4perl.
%prep
%setup -q -n Log-Any-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Changes LICENSE META.json README tidyall.ini
%{perl_vendorlib}/*
%{_mandir}/man3/*
%changelog
* Thu Jul 18 2013 Christopher J Kucera 0.15-1
- Specfile autogenerated by cpanspec 1.78.
####
cd rpmbuild/SOURCES
wget http://www.cpan.org/modules/by-module/Log/Log-Any-0.15.tar.gz
####
rpmbuild -ba perl-Log-Any.spec
####
rpm -i perl-Log-Any-0.15-1.el6.noarch.rpm