%define perl_vendorlib %(eval "`%{_bindir}/perl -V:installvendorlib`"; echo $installvendorlib) Name: perl-File-Which Version: 0.05 Release: 1 Summary: Portable implementation of the 'which' utility Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/File-Which/ Source0: http://www.cpan.org/authors/id/P/PE/PEREINAR/File-Which-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker) Requires: perl(:MODULE_COMPAT_%(eval "`%{_bindir}/perl -V:version`"; echo $version)) Requires: perl >= 5.8.8 %description File::Which is a portable implementation (in Perl) of 'which', and can be used to get the absolute filename of an executable program installed somewhere in your PATH, or just check for its existence. It includes the command-line utility 'pwhich' which has the same function as 'which'. %prep %setup -q -n File-Which-%{version} %build %{_bindir}/perl Makefile.PL INSTALLDIRS=vendor make %install [ "${RPM_BUILD_ROOT}" != "/" ] && 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} -type d -depth -exec rmdir {} 2>/dev/null ';' chmod -R u+w ${RPM_BUILD_ROOT}/* %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc Changes README %{_bindir}/pwhich %{perl_vendorlib}/* %{_mandir}/man1/* %{_mandir}/man3/* %changelog * Sun Nov 09 2008 Michael Perzl - 0.05-1 - first version for AIX V5.1 and higher