Subject: [alpine-aports] [PATCH] testing/perl-xml-sax: register the SAX parser into the registry

From: Sören Tempel <[email-masked]>
Date: Thu, 24 Sep 2015 22:35:58 +0200

---
 testing/perl-xml-sax/APKBUILD                   | 5 +++--
 testing/perl-xml-sax/perl-xml-sax.post-install  | 5 +++++
 testing/perl-xml-sax/perl-xml-sax.pre-deinstall | 5 +++++
 3 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 testing/perl-xml-sax/perl-xml-sax.post-install
 create mode 100644 testing/perl-xml-sax/perl-xml-sax.pre-deinstall

diff --git a/testing/perl-xml-sax/APKBUILD b/testing/perl-xml-sax/APKBUILD
index 3b1e6f7..c6cdaa3 100644
--- a/testing/perl-xml-sax/APKBUILD
+++ b/testing/perl-xml-sax/APKBUILD
@@ -1,8 +1,9 @@
+# Contributor: Sören Tempel <[email-masked]>
 # Contributor: Carlo Landmeter <[email-masked]>
 # Maintainer:
 pkgname=perl-xml-sax
 pkgver=0.99
-pkgrel=1
+pkgrel=2
 pkgdesc="Simple API for XML"
 url="http://search.cpan.org/dist/XML-SAX"
 arch="noarch"
@@ -10,7 +11,7 @@ license="GPL"
 depends="perl-xml-sax-base perl-xml-namespacesupport"
 depends_dev="perl-dev"
 makedepends="$depends_dev"
-install=""
+install="$pkgname.post-install $pkgname.pre-deinstall"
 subpackages="$pkgname-doc"
 source="http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-$pkgver.tar.gz
 	perl-xml-sax.patch"
diff --git a/testing/perl-xml-sax/perl-xml-sax.post-install b/testing/perl-xml-sax/perl-xml-sax.post-install
new file mode 100644
index 0000000..cada1f3
--- /dev/null
+++ b/testing/perl-xml-sax/perl-xml-sax.post-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Registers the SAX parser into the registry.
+
+LC_ALL=C perl -MXML::SAX -e \
+	"XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()" 2>&1 >/dev/null
diff --git a/testing/perl-xml-sax/perl-xml-sax.pre-deinstall b/testing/perl-xml-sax/perl-xml-sax.pre-deinstall
new file mode 100644
index 0000000..fb56f1a
--- /dev/null
+++ b/testing/perl-xml-sax/perl-xml-sax.pre-deinstall
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Unregisters the SAX parser from the registry.
+
+LC_ALL=C perl -MXML::SAX -e \
+	"XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()" 2>&1 >/dev/null
-- 
2.5.3

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---