[arch-commits] Commit in docbook-sgml31/repos (3 files)

Felix Yan felixonmars at archlinux.org
Sat May 16 09:42:27 UTC 2020


    Date: Saturday, May 16, 2020 @ 09:42:27
  Author: felixonmars
Revision: 383919

archrelease: copy trunk to staging-any

Added:
  docbook-sgml31/repos/staging-any/
  docbook-sgml31/repos/staging-any/PKGBUILD
    (from rev 383917, docbook-sgml31/trunk/PKGBUILD)
  docbook-sgml31/repos/staging-any/docbook-sgml31.install
    (from rev 383917, docbook-sgml31/trunk/docbook-sgml31.install)

------------------------+
 PKGBUILD               |   37 +++++++++++++++++++++++++++++++++++++
 docbook-sgml31.install |   42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)

Copied: docbook-sgml31/repos/staging-any/PKGBUILD (from rev 383917, docbook-sgml31/trunk/PKGBUILD)
===================================================================
--- staging-any/PKGBUILD	                        (rev 0)
+++ staging-any/PKGBUILD	2020-05-16 09:42:27 UTC (rev 383919)
@@ -0,0 +1,37 @@
+# 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=4
+pkgdesc="Legacy docbook-sgml"
+arch=('any')
+url='https://www.docbook.org/sgml/'
+license=('MIT')
+depends=('sgml-common')
+install=$pkgname.install
+source=("https://www.docbook.org/sgml/${pkgver}/docbk31.zip")
+sha256sums=('20261d2771b9a052abfa3d8fab1aa62be05791a010281c566f9073bf0e644538')
+
+build() {
+  cd "$srcdir"
+  # This command removes the ENT definitions from the catalog file.
+  # This command replaces the DTDDECL catalog entry, which is not supported by Linux SGML tools, 
+  # with the SGMLDECL catalog entry.
+  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"
+}
+

Copied: docbook-sgml31/repos/staging-any/docbook-sgml31.install (from rev 383917, docbook-sgml31/trunk/docbook-sgml31.install)
===================================================================
--- staging-any/docbook-sgml31.install	                        (rev 0)
+++ staging-any/docbook-sgml31.install	2020-05-16 09:42:27 UTC (rev 383919)
@@ -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