%define perl_vendorarch %(eval "`%{_bindir}/perl -V:installvendorarch`"; echo $installvendorarch) %define perl_vendorarch64 %(eval "`%{_bindir}/perl_64bit -V:installvendorarch`"; echo $installvendorarch) Name: perl-XML-LibXML Version: 2.0012 Release: 1 Summary: Perl interface to the libxml2 library Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/XML-LibXML/ Source0: http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/XML-LibXML-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: libxml2-devel >= 2.6.32-2 BuildRequires: perl-XML-NamespaceSupport BuildRequires: perl-XML-SAX Requires: libxml2 >= 2.6.32-2 Requires: perl(:MODULE_COMPAT_%(eval "`%{_bindir}/perl -V:version`"; echo $version)) Requires: perl >= 5.8.8 Provides: perl-XML-LibXML-Common = %{version} Obsoletes: perl-XML-LibXML-Common <= 0.13 %description This module implements a Perl interface to the GNOME libxml2 library which provides interfaces for parsing and manipulating XML files. This module allows Perl programmers to make use of the highly capable validating XML parser and the high performance DOM implementation. %prep %setup -q -n XML-LibXML-%{version} mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build cd 64bit %{_bindir}/perl_64bit Makefile.PL SKIP_SAX_INSTALL=1 INSTALLDIRS=vendor make CC=gcc cd ../32bit %{_bindir}/perl Makefile.PL SKIP_SAX_INSTALL=1 INSTALLDIRS=vendor make CC=gcc %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit make pure_install PERL_INSTALL_ROOT=${RPM_BUILD_ROOT} cd ../32bit 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}/* %triggerin -- perl-XML-SAX for p in XML::LibXML::SAX::Parser XML::LibXML::SAX ; do %{_bindir}/perl -MXML::SAX -e "XML::SAX->add_parser(q($p))->save_parsers()" \ 2>/dev/null || : done %preun if [ $1 -eq 0 ] ; then for p in XML::LibXML::SAX::Parser XML::LibXML::SAX ; do %{_bindir}/perl -MXML::SAX -e "XML::SAX->remove_parser(q($p))->save_parsers()" \ 2>/dev/null || : done fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/Changes 32bit/LICENSE 32bit/README %{perl_vendorarch}/auto/XML %{perl_vendorarch64}/auto/XML %{perl_vendorarch}/XML %{perl_vendorarch64}/XML %{_mandir}/man3/*.3* %changelog * Wed Jan 30 2013 Michael Perzl - 2.0012-1 - updated to version 2.0012 * Wed Nov 16 2011 Michael Perzl - 1.88-1 - first version for AIX V5.1 and higher