%define perl_vendorarch %(eval "`%{_bindir}/perl -V:installvendorarch`"; echo $installvendorarch) %define perl_vendorarch64 %(eval "`%{_bindir}/perl_64bit -V:installvendorarch`"; echo $installvendorarch) Name: perl-gettext Version: 1.05 Release: 1 Summary: Interface to gettext family of functions Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/gettext/ Source0: http://search.cpan.org/CPAN/authors/id/P/PV/PVANDRY/gettext-%{version}.tar.gz Patch0: http://patch-tracking.debian.net/patch/series/view/liblocale-gettext-perl/1.05-4/compatibility-with-POSIX-module.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: patch BuildRequires: perl >= 5.8.8 BuildRequires: gettext Requires: perl >= 5.8.8 Requires: perl(:MODULE_COMPAT_%(eval "`%{_bindir}/perl -V:version`"; echo $version)) Obsoletes: perl-Locale-gettext <= 1.05 %description The gettext module permits access from perl to the gettext() family of functions for retrieving message strings from databases constructed to internationalize software. %prep %setup -q -n gettext-%{version} export PATH=/opt/freeware/bin:$PATH %patch0 -p1 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %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 * Mon May 02 2011 Michael Perzl - 1.05-1 - first version for AIX V5.1 and higher