[arch-commits] Commit in (3 files)
Andreas Radke
andyrtr at archlinux.org
Wed Apr 13 17:46:21 UTC 2016
Date: Wednesday, April 13, 2016 @ 19:46:21
Author: andyrtr
Revision: 264825
add pkg to build documentation
Added:
docbook-sgml31/
docbook-sgml31/PKGBUILD
docbook-sgml31/docbook-sgml31.install
------------------------+
PKGBUILD | 36 ++++++++++++++++++++++++++++++++++++
docbook-sgml31.install | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 78 insertions(+)
Added: docbook-sgml31/PKGBUILD
===================================================================
--- docbook-sgml31/PKGBUILD (rev 0)
+++ docbook-sgml31/PKGBUILD 2016-04-13 17:46:21 UTC (rev 264825)
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 262050 2016-03-18 18:02:01Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr at archlinux.org>
+
+# Contributor: Chris Severance aur.severach aATt spamgourmet dott com
+# Contributor: Andreas B. Wagner <AndreasBWagner at gmail.com>
+
+pkgname=docbook-sgml31
+pkgver=3.1
+pkgrel=2
+pkgdesc="Legacy docbook-sgml"
+#arch=('i686' 'x86_64')
+arch=('any')
+url='http://www.docbook.org/sgml/'
+license=('custom')
+depends=('sgml-common')
+install=$pkgname.install
+source=("http://www.docbook.org/sgml/${pkgver}/docbk31.zip")
+sha256sums=('20261d2771b9a052abfa3d8fab1aa62be05791a010281c566f9073bf0e644538')
+
+build() {
+ cd "$srcdir"
+ sed -i -e '/ISO 8879/d' \
+ -e 's|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' \
+ docbook.cat
+}
+
+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"
+}
+
Added: docbook-sgml31/docbook-sgml31.install
===================================================================
--- docbook-sgml31/docbook-sgml31.install (rev 0)
+++ docbook-sgml31/docbook-sgml31.install 2016-04-13 17:46:21 UTC (rev 264825)
@@ -0,0 +1,42 @@
+# 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%-*}"
+}
+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:
+
More information about the arch-commits
mailing list