From 7a65a910b77ad191d69881098c47f9b0c852d92e Mon Sep 17 00:00:00 2001 From: root Date: Tue, 13 Aug 2013 01:33:19 -0700 Subject: Tue Aug 13 01:31:08 PDT 2013 --- community/perl-xml-libxml/PKGBUILD | 36 +++++++++++++++++++++++ community/perl-xml-libxml/perl-xml-libxml.install | 15 ++++++++++ 2 files changed, 51 insertions(+) create mode 100644 community/perl-xml-libxml/PKGBUILD create mode 100644 community/perl-xml-libxml/perl-xml-libxml.install (limited to 'community/perl-xml-libxml') diff --git a/community/perl-xml-libxml/PKGBUILD b/community/perl-xml-libxml/PKGBUILD new file mode 100644 index 000000000..95584071e --- /dev/null +++ b/community/perl-xml-libxml/PKGBUILD @@ -0,0 +1,36 @@ +# $Id: PKGBUILD 93872 2013-07-11 16:11:22Z jsteel $ +# Maintainer: Jonathan Steel +# Contributor: Justin "juster" Davis +# Contributor: François Charette + +pkgname=perl-xml-libxml +pkgver=2.0019 +pkgrel=1 +pkgdesc="Interface to the libxml library" +arch=('i686' 'x86_64') +url="http://search.cpan.org/dist/XML-LibXML" +license=('GPL') +depends=('libxml2' 'perl-xml-sax>=0.11' 'perl-xml-namespacesupport>=1.07') +provides=('perl-libxml' 'perl-xml-libxml-common') +replaces=('perl-libxml' 'perl-xml-libxml-common') +conflicts=('perl-libxml' 'perl-xml-libxml-common') +options=('!emptydirs') +install=perl-xml-libxml.install +source=(http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-$pkgver.tar.gz) +md5sums=('0873ac0bae4a4bf7ba7b2d970876e4ba') + +build() { + cd XML-LibXML-$pkgver + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + make +} + +check() { + cd XML-LibXML-$pkgver + make test +} + +package() { + cd XML-LibXML-$pkgver + make pure_install doc_install DESTDIR="$pkgdir" +} diff --git a/community/perl-xml-libxml/perl-xml-libxml.install b/community/perl-xml-libxml/perl-xml-libxml.install new file mode 100644 index 000000000..43c29a245 --- /dev/null +++ b/community/perl-xml-libxml/perl-xml-libxml.install @@ -0,0 +1,15 @@ +post_install() { + echo ":: Installing SAX XML Parsers" + /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()" + /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX))->save_parsers()" +} + +post_upgrade() { + libxmlcount=`grep -c XML::LibXML::SAX /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini` + if [[ $libxmlcount == 0 ]]; then + echo ":: Installing SAX XML Parsers" + /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()" + /usr/bin/perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX))->save_parsers()" + fi +} + -- cgit v1.2.3-54-g00ecf