perl-Guard/perl-Guard.spec

71 lines
2.1 KiB
RPMSpec
Raw Permalink Normal View History

%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name: perl-Guard
Version: 1.023
Release: 1mamba
Summary: Guard - safe cleanup blocks
Group: System/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: Automatic Build System <autodist@mambasoft.it>
URL: http://www.cpan.org
Source: http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/Guard-%{version}.tar.gz
License: GPL, Artistic
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl-devel
Requires: perl >= %perl_major_ver
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
This module implements so-called "guards". A guard is something
(usually an object) that "guards" a resource, ensuring that it is
cleaned up when expected.
Specifically, this module supports two different types of guards:
guard objects, which execute a given code block when destroyed, and
scoped guards, which are tied to the scope exit.
%prep
%setup -q -n Guard-%{version}
%build
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
%make
%make test
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall_perl
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
chmod -R u+w %{buildroot}/*
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Guard.pm
%{_mandir}/man3/*.3pm.gz
%doc Changes COPYING README
%changelog
* Sat Nov 29 2014 Automatic Build System <autodist@mambasoft.it> 1.023-1mamba
- automatic update by autodist
* Mon Nov 12 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.022-2mamba
- perl 5.16 mass rebuild
* Wed Nov 16 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.022-1mamba
- update to 1.022
* Sun Feb 20 2011 gil <puntogil@libero.it> 1.021-1mamba
- package created by autospec