%define perl_vendorarch %(eval "`%{_bindir}/perl -V:installvendorarch`"; echo $installvendorarch) %define perl_vendorarch64 %(eval "`%{_bindir}/perl_64bit -V:installvendorarch`"; echo $installvendorarch) Name: perl-TermReadKey Version: 2.30 Release: 1 Summary: A perl module for simple terminal control Group: Development/Libraries License: Copyright only URL: http://search.cpan.org/dist/TermReadKey/ Source0: http://www.cpan.org/authors/id/J/JS/JSTOWE/TermReadKey-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root # this packages is provided by our base perl package #BuildRequires: perl(ExtUtils::MakeMaker) Requires: perl(:MODULE_COMPAT_%(eval "`%{_bindir}/perl -V:version`"; echo $version)) Requires: perl >= 5.8.8 %description Term::ReadKey is a compiled perl module dedicated to providing simple control over terminal driver modes (cbreak, raw, cooked, etc.) support for non-blocking reads, if the architecture allows, and some generalized handy functions for working with terminals. One of the main goals is to have the functions as portable as possible, so you can just plug in "use Term::ReadKey" on any architecture and have a good likelyhood of it working. %prep %setup -q -n TermReadKey-%{version} 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 32bit/README %{perl_vendorarch}/* %{perl_vendorarch64}/* %{_mandir}/man3/*.3* %changelog * Wed Dec 03 2008 Michael Perzl - 2.30-1 - first version for AIX V5.1 and higher