[arch-commits] Commit in perl-xml-libxml/repos (3 files)

Felix Yan felixonmars at archlinux.org
Wed Aug 1 09:45:02 UTC 2018


    Date: Wednesday, August 1, 2018 @ 09:45:02
  Author: felixonmars
Revision: 330124

archrelease: copy trunk to staging-x86_64

Added:
  perl-xml-libxml/repos/staging-x86_64/
  perl-xml-libxml/repos/staging-x86_64/PKGBUILD
    (from rev 330123, perl-xml-libxml/trunk/PKGBUILD)
  perl-xml-libxml/repos/staging-x86_64/perl-xml-libxml.install
    (from rev 330123, perl-xml-libxml/trunk/perl-xml-libxml.install)

-------------------------+
 PKGBUILD                |   37 +++++++++++++++++++++++++++++++++++++
 perl-xml-libxml.install |   23 +++++++++++++++++++++++
 2 files changed, 60 insertions(+)

Copied: perl-xml-libxml/repos/staging-x86_64/PKGBUILD (from rev 330123, perl-xml-libxml/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2018-08-01 09:45:02 UTC (rev 330124)
@@ -0,0 +1,37 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Jonathan Steel <jsteel at aur.archlinux.org>
+# Contributor: Justin "juster" Davis <jrcd83 at gmail.com>
+# Contributor: François Charette <francois.archlinux.org>
+
+pkgname=perl-xml-libxml
+pkgver=2.0132
+pkgrel=2
+pkgdesc="Interface to the libxml library"
+arch=('x86_64')
+url="http://search.cpan.org/dist/XML-LibXML"
+license=('GPL')
+depends=('libxml2' 'perl-xml-sax' 'perl-xml-namespacesupport')
+checkdepends=('perl-test-pod' 'perl-test-leaktrace' 'perl-cpan-changes' 'perl-uri')
+provides=('perl-libxml' 'perl-xml-libxml-common')
+replaces=('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)
+sha512sums=('3df1cb67ea955133492f2b6f8def2b28079c59e99170a31820aca69ea81686c4b67171509f1b311faab9389d200c4a24942b3950d7c0730ff1233a009b398fce')
+
+build() {
+  cd "$srcdir"/XML-LibXML-$pkgver
+  perl Makefile.PL INSTALLDIRS=vendor
+  make
+}
+
+check() {
+  cd "$srcdir"/XML-LibXML-$pkgver
+  make test
+}
+
+package() {
+  cd "$srcdir"/XML-LibXML-$pkgver
+  make pure_install doc_install DESTDIR="$pkgdir"/
+}

Copied: perl-xml-libxml/repos/staging-x86_64/perl-xml-libxml.install (from rev 330123, perl-xml-libxml/trunk/perl-xml-libxml.install)
===================================================================
--- staging-x86_64/perl-xml-libxml.install	                        (rev 0)
+++ staging-x86_64/perl-xml-libxml.install	2018-08-01 09:45:02 UTC (rev 330124)
@@ -0,0 +1,23 @@
+post_install() {
+  echo ":: Installing SAX XML Parsers"
+  perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
+  perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX))->save_parsers()"
+}
+
+post_upgrade() {
+  if [[ ! -f /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini ]]; then
+    post_install
+  else
+    libxmlcount=`grep -c XML::LibXML::SAX /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini`
+    if [[ $libxmlcount == 0 ]]; then
+      post_install
+    fi
+  fi
+}
+
+pre_remove() {
+  if [[ -f /usr/share/perl5/vendor_perl/XML/SAX/ParserDetails.ini ]]; then
+    perl -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
+    perl -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX))->save_parsers()"
+  fi
+}



More information about the arch-commits mailing list