%define pkg_name Cwd %define pkg_version 2.17 %define rpm_version 2.17 %define rpm_release 1.n0i.1 %define filelist %{_tmppath}/%{pkg_name}-%{version}-%{release}.filelist %define make_test %{?_without_test:0}%{!?_without_test:1} %define perl_vendorarch %(perl -MConfig -le 'print $Config{vendorarchexp}') Summary: Current working directory functions Version: %{rpm_version} Name: perl-%{pkg_name} %if "%{pkg_version}" == "%{rpm_version}" Release: %{rpm_release} %else Release: %{rpm_release}.%{pkg_version} %endif Epoch: 0 License: Artistic Group: Development/Languages URL: http://search.cpan.org/search?mode=module;query=%{pkg_name} Source0: ftp://ftp.cpan.org/authors/id/K/KW/KWILLIAMS/%{pkg_name}-%{pkg_version}.tar.gz Requires: %(perl -MConfig -le '$out = $Config{useithreads} ? "" : "OUT"; print "perl(:WITH${out}_ITHREADS)"') Requires: %(perl -MConfig -le '$out = $Config{usethreads} ? "" : "OUT"; print "perl(:WITH${out}_THREADS)"') Requires: %(perl -MConfig -le '$out = $Config{uselargefiles} ? "" : "OUT"; print "perl(:WITH${out}_LARGEFILES)"') Requires: %(perl -MConfig -le 'print $Config{vendorarchexp}') Requires: %(perl -MConfig -le 'print $Config{vendorlibexp}') BuildPrereq: perl(Module::Build) BuildRequires: perl(Test::More) BuildRequires: perl(Scalar::Util) BuildRequires: perl(XSLoader) BuildRequires: perl(File::Spec) BuildRequires: perl(File::Path) BuildRequires: perl(Module::Build) >= 0.19 BuildRequires: perl(Carp) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description This module provides functions for determining the pathname of the current working directory. It is recommended that getcwd (or another *cwd() function) be used in *all* code to ensure portability. %prep %setup -q -n %{pkg_name}-%{pkg_version} %build export PERL_MM_USE_DEFAULT=1 export CFLAGS="$RPM_OPT_FLAGS" export CCFLAGS="$RPM_OPT_FLAGS" perl Build.PL destdir=$RPM_BUILD_ROOT installdirs=vendor ./Build %{?_smp_mflags} %if %{?make_test} ./Build test %endif %install rm -rf $RPM_BUILD_ROOT ./Build install destdir=$RPM_BUILD_ROOT [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress # remove special files find $RPM_BUILD_ROOT -name perllocal.pod -o -name .packlist -o -name "*.bs" \ | xargs -i rm -f {} # no empty directories find $RPM_BUILD_ROOT -depth -type d -a -empty -exec rmdir {} \; # build files list find $RPM_BUILD_ROOT -type f -print \ | sed "s@^$RPM_BUILD_ROOT@@g" > %{filelist} find $RPM_BUILD_ROOT%{perl_vendorarch} -type d -print \ | sed "s@^$RPM_BUILD_ROOT@%%dir @g" \ | grep -v '^%dir %{perl_vendorarch}$' \ | grep -v '/auto$' >> %{filelist} if [ -z %{filelist} ] ; then echo "ERROR: EMPTY FILE LIST" exit -1 fi # mark POD files as documentation perl -pi -e 's/^(.+?\.pod)$/%%doc $1/' %{filelist} %clean rm -rf $RPM_BUILD_ROOT rm -f %{filelist} %files -f %{filelist} %defattr(-,root,root) %doc Changes %changelog * Tue Mar 23 2004 Marius Feraru 0:2.17-1.n0i.1 - version 2.17 - spec file (re?)created using N0i::CPAN::RPMizer/2004032101