[suggest] perl-File-Which

Al Pacifico adpacifico at users.sourceforge.net
Fri Sep 29 15:51:58 CEST 2006


Name:           perl-File-Which
Version:        0.05
Release:        1%{?dist}
Summary:        Portable Perl implementation of the `which' utility

Group:          Development/Libraries
License:        GPL or Artistic
URL:            http://search.cpan.org/dist/File-Which/
Source0:
ftp://ftp.cpan.org/pub/CPAN/modules/by-module/File/File-Which-%{version}.tar.gz<ftp://ftp.cpan.org/pub/CPAN/modules/by-module/File/File-Which-%25%7Bversion%7D.tar.gz>
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u}
-n)

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

%description
File::Which was created to be able to get the paths to executable programs
on
systems under which the `which' program wasn't implemented in the shell.

File::Which searches the directories of the user's PATH (as returned by
File::Spec->path()), looking for executable files having the name specified
as a parameter to which(). Under Win32 systems, which do not have a notion
of directly executable files, but uses special extensions such as .exe and
.bat to identify them, File::Which takes extra steps to assure that you
will find the correct file (so for example, you might be searching for perl,

it'll try perl.exe, perl.bat, etc.)

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


%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}


%install
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 f -name '*.bs' -a -size 0 -exec rm -f {} ';'
# remove the pwich binary and its man page, as these seem unneccessary
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/pwhich.1
rm -f $RPM_BUILD_ROOT/usr/bin/pwhich
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*


%check
make test


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README Changes
%{perl_vendorlib}/*
%doc %{_mandir}/man3/*.3*


%changelog
* Tue Jul 18 2006 Al Pacifico <adpacifico at users.sourceforge.net> - 0.05-1
- Initial packaging, using fedora-newrpmspec to generate .spec template
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.repoforge.org/pipermail/users/attachments/20060929/6da1e739/attachment-0004.html>


More information about the users mailing list