diff options
author | Britney Fransen <brfransen@gmail.com> | 2020-07-06 02:27:27 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2020-07-06 02:27:27 (GMT) |
commit | 0b98e2bf564833a70ed74fab6c6771b7d9d096d0 (patch) | |
tree | ee3f506296cb1fba0b66074615bad559efb96af8 /abs/extra | |
parent | addaf6b7e7ea8bc9649e9c15a57b6a1144516971 (diff) | |
download | linhes_pkgbuild-0b98e2bf564833a70ed74fab6c6771b7d9d096d0.zip linhes_pkgbuild-0b98e2bf564833a70ed74fab6c6771b7d9d096d0.tar.gz linhes_pkgbuild-0b98e2bf564833a70ed74fab6c6771b7d9d096d0.tar.bz2 |
docbook-sgml: dep of valgrind
Diffstat (limited to 'abs/extra')
-rw-r--r-- | abs/extra/docbook-sgml/PKGBUILD | 51 | ||||
-rw-r--r-- | abs/extra/docbook-sgml/docbook-sgml.install | 55 |
2 files changed, 106 insertions, 0 deletions
diff --git a/abs/extra/docbook-sgml/PKGBUILD b/abs/extra/docbook-sgml/PKGBUILD new file mode 100644 index 0000000..e7439d9 --- /dev/null +++ b/abs/extra/docbook-sgml/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Felix Yan <felixonmars@gmail.com> +# Contributor: Andrew Fyfe <andrew@neptune-one.net> +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> + +pkgname=docbook-sgml +pkgver=4.5 +pkgrel=7 +pkgdesc='Document type definitions for verification of SGML data files against the DocBook rule set.' +arch=('any') +url='https://www.docbook.org/sgml/' +license=('MIT') +depends=('sgml-common') +install='docbook-sgml.install' +source=("https://www.docbook.org/sgml/${pkgver}/docbook-${pkgver}.zip") +sha256sums=('8043e514e80c6c19cb146b5d37937d1305bf3abf9b0097c36df7f70f611cdf43') + +build() { + cd "$srcdir" + + local DTDDIR="usr/share/sgml/docbook-sgml-$pkgver" + + sed -i \ + -e '/ISO 8879/d' \ + -e '/gml/d' \ + docbook.cat + + # Add support for previous versions. + cat >> docbook.cat << "EOF" + + -- Begin Single Major Version catalog changes -- + +PUBLIC "-//OASIS//DTD DocBook V4.4//EN" "docbook.dtd" +PUBLIC "-//OASIS//DTD DocBook V4.3//EN" "docbook.dtd" +PUBLIC "-//OASIS//DTD DocBook V4.2//EN" "docbook.dtd" +PUBLIC "-//OASIS//DTD DocBook V4.1//EN" "docbook.dtd" +PUBLIC "-//OASIS//DTD DocBook V4.0//EN" "docbook.dtd" + + -- End Single Major Version catalog changes -- + +EOF +} + +package() { + cd "$srcdir" + + local DTDDIR="usr/share/sgml/docbook-sgml-$pkgver" + + install -dm755 "$pkgdir/$DTDDIR" + install -m644 docbook.cat "$pkgdir/$DTDDIR/catalog" + install -m644 *.dtd *.mod *.dcl "$pkgdir/$DTDDIR" +} diff --git a/abs/extra/docbook-sgml/docbook-sgml.install b/abs/extra/docbook-sgml/docbook-sgml.install new file mode 100644 index 0000000..61c78e7 --- /dev/null +++ b/abs/extra/docbook-sgml/docbook-sgml.install @@ -0,0 +1,55 @@ +# arg 1: the new package version +pre_install() { + /bin/true +} + +# arg 1: the new package version +post_install() { + add_catalog "${1%-*}" +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + remove_catalog "${2%-*}" +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + add_catalog "${1%-*}" +} + +# arg 1: the old package version +pre_remove() { + remove_catalog "${1%-*}" +} + +# arg 1: the old package version +post_remove() { + /bin/true +} + + +add_catalog() { + install-catalog --add /etc/sgml/sgml-docbook-dtd-$1.cat \ + /usr/share/sgml/docbook-sgml-$1/catalog > /dev/null 2>&1 + + install-catalog --add /etc/sgml/sgml-docbook-dtd-$1.cat \ + /etc/sgml/sgml-docbook.cat > /dev/null 2>&1 +} + +remove_catalog() { + install-catalog --remove /etc/sgml/sgml-docbook-dtd-$1.cat \ + /usr/share/sgml/docbook-sgml-$1/catalog > /dev/null 2>&1 + + install-catalog --remove /etc/sgml/sgml-docbook-dtd-$1.cat \ + /etc/sgml/sgml-docbook.cat > /dev/null 2>&1 +} + +op=$1 +shift +$op "$@" + +# vim:set syntax=sh ts=4 sw=4 noet: + |