1

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

Sören Tempel
Details
Message ID
<1443126958-16507-1-git-send-email-soeren+git@soeren-tempel.net>
Sender timestamp
1443126958
DKIM signature
missing
Download raw message
Patch: +13 -2
---
 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 <soeren+alpine@soeren-tempel.net>
 # Contributor: Carlo Landmeter <clandmeter@gmail.com>
 # 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:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Sören Tempel
Details
Message ID
<20150926094509.GA25397@francium.lan>
In-Reply-To
<1443126958-16507-1-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1443260727
DKIM signature
missing
Download raw message
Actually this might need an additional symlink from a post-upgrade
install file to the post-install file otherwise the parser
wouldn't be registered when the package is already installed and simply
upgraded.

Sören.


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---