Blob Blame History Raw
Name:           perl-File-Tempdir
Version:        0.02
Release:        1%{?dist}
Summary:        Object interface for File::Temp module
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/File-Tempdir/

Source0:        http://search.cpan.org/CPAN/authors/id/N/NA/NANARDON/File-Tempdir-%{version}.tar.gz
%{?el5:BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)}
BuildArch:      noarch

BuildRequires:  coreutils
BuildRequires:  findutils
BuildRequires:  make
BuildRequires:  perl
BuildRequires:  perl(ExtUtils::MakeMaker)

# Run-time
BuildRequires:  perl(File::Path)
BuildRequires:  perl(File::Temp)
BuildRequires:  perl(strict)
BuildRequires:  perl(warnings)

# Testing
BuildRequires:  perl(Test::More)

Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
This module provide an object interface to tempdir() from File::Temp. This
allow to destroy the temporary directory as soon you don't need it anymore
using the magic DESTROY() function automatically call be perl when the
object is no longer reference.

%prep
%setup -q -n File-Tempdir-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
%if 0%{?el5}
rm -rf $RPM_BUILD_ROOT
%endif

make pure_install DESTDIR=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;

%{_fixperms} $RPM_BUILD_ROOT/*

%check
make test

%if 0%{?el5}
%clean
rm -rf $RPM_BUILD_ROOT
%endif

%files
%{perl_vendorlib}/*
%{_mandir}/man3/*


%changelog
* Thu Jan 21 2016 Denis Fateyev <denis@fateyev.com> - 0.02-1
- Initial release