%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0) Name: perl-File-pushd Version: 1.002 Release: 2mamba Summary: File::pushd - change directory temporarily for a limited scope Group: System/Libraries/Perl Vendor: openmamba Distribution: openmamba Packager: Automatic Build System URL: http://www.cpan.org Source: http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/File-pushd-%{version}.tar.gz License: GPL, Artistic BuildRequires: perl(Module::Build) BuildRequires: perl(Test::More) BuildRequires: perl-devel Requires: perl >= %perl_major_ver BuildRoot: %{_tmppath}/%{name}-%{version}-root %description File::pushd does a temporary chdir that is easily and automatically reverted, similar to pushd in some Unix command shells. It works by creating an object that caches the original working directory. When the object is destroyed, the destructor calls chdir to revert to the original working directory. By storing the object in a lexical variable with a limited scope, this happens automatically at the end of the scope. This is very handy when working with temporary directories for tasks like testing; a function is provided to streamline getting a temporary directory from File::Temp. For convenience, the object stringifies as the canonical form of the absolute pathname of the directory entered. %prep %setup -q -n File-pushd-%{version} %build perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor %make %make test %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall_perl packlist=`find %{buildroot} -name .packlist` [ -z "$packlist" ] && exit 1 || cat $packlist | \ sed "s,%buildroot,,g;s,.*/man/.*,&.gz,g" | \ sort -u > .packlist && rm $packlist strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,'` for dir in `find %{buildroot} -type d | grep $strid`; do echo "%dir ${dir#%buildroot}" >> .packlist done %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files -f .packlist %defattr(-,root,root) %doc LICENSE #Changes README Todo %changelog * Mon Nov 12 2012 Silvan Calarco 1.002-2mamba - perl 5.16 mass rebuild * Sat Jun 16 2012 Automatic Build System 1.002-1mamba - automatic version update by autodist * Sun Feb 20 2011 gil 1.00-1mamba - package created by autospec