perl-Guard/perl-Guard.spec

77 lines
2.2 KiB
RPMSpec

%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name: perl-Guard
Version: 1.023
Release: 3mamba
Summary: Guard - safe cleanup blocks
Group: System/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: Automatic Build System <autodist@mambasoft.it>
URL: https://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 >= 2:5.36.0
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl-devel
Requires: perl >= %perl_major_ver
%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
* Sun Apr 16 2023 Sdk Build System <sdk@mambasoft.it> 1.023-3mamba
- rebuilt with perl 5.36.0
* Wed Nov 09 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 1.023-2mamba
- rebuilt with perl 5.24
* 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