%define perl_vendorarch %(eval "`%{_bindir}/perl -V:installvendorarch`"; echo $installvendorarch) %define perl_vendorarch64 %(eval "`%{_bindir}/perl_64bit -V:installvendorarch`"; echo $installvendorarch) Name: perl-Filesys-Df Version: 0.92 Release: 1 Summary: Perl extension for filesystem disk space information License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Filesys-Df/ Source0: http://www.cpan.org/modules/by-module/Filesys/Filesys-Df-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root # this is provided by our base perl package #BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: sed Requires: perl(:MODULE_COMPAT_%(eval "`%{_bindir}/perl -V:version`"; echo $version)) Requires: perl >= 5.8.8 %description This module provides a way to obtain filesystem disk space information. This is a Unix only distribution. If you want to gather this information for Unix and Windows, use Filesys::DfPortable. The only major benefit of using Filesys::Df over Filesys::DfPortable, is that Filesys::Df supports the use of open filehandles as arguments. %prep %setup -q -n Filesys-Df-%{version} #readme is with dos EOL, convert it to unix /opt/freeware/bin/sed -i 's/\r//' README mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build cd 32bit %{_bindir}/perl Makefile.PL INSTALLDIRS="vendor" make cd ../64bit %{_bindir}/perl_64bit Makefile.PL INSTALLDIRS="vendor" make %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 32bit make pure_install PERL_INSTALL_ROOT=${RPM_BUILD_ROOT} cd ../64bit make pure_install PERL_INSTALL_ROOT=${RPM_BUILD_ROOT} /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type f -name .packlist -exec rm -f {} ';' /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type f -name '*.bs' -empty -exec rm -f {} ';' /opt/freeware/bin/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 %{perl_vendorarch}/* %{perl_vendorarch64}/* %{_mandir}/man3/* %changelog * Sun Nov 09 2008 Michael Perzl - 0.92 - first version for AIX V5.1 and higher