summaryrefslogtreecommitdiff
path: root/repo/docbook-dtd
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
committerdavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
commit48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch)
tree00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/docbook-dtd
parent871b2b573f01c1b3176a0f65458b3d281b41c437 (diff)
removed idea of repos
Diffstat (limited to 'repo/docbook-dtd')
-rw-r--r--repo/docbook-dtd/docbook-dtd.xibuild128
1 files changed, 128 insertions, 0 deletions
diff --git a/repo/docbook-dtd/docbook-dtd.xibuild b/repo/docbook-dtd/docbook-dtd.xibuild
new file mode 100644
index 0000000..f751d36
--- /dev/null
+++ b/repo/docbook-dtd/docbook-dtd.xibuild
@@ -0,0 +1,128 @@
+#!/bin/sh
+
+MAKEDEPS="unzip"
+DEPS="libxml2 sgml-common"
+
+PKG_VER=4.5
+SOURCE=https://www.docbook.org/sgml/$PKG_VER/docbook-$PKG_VER.zip
+DESC="Document type definitions for verification of SGML data files"
+
+prepare() {
+ sed -i -e '/ISO 8879/d' \
+ -e '/gml/d' docbook.cat
+
+}
+
+package () {
+ install -d $PKG_DEST/usr/share/sgml/docbook/sgml-dtd-$PKG_VER &&
+ chown -R root:root . &&
+
+ install docbook.cat $PKG_DEST/usr/share/sgml/docbook/sgml-dtd-$PKG_VER/catalog &&
+ cp -af *.dtd *.mod *.dcl $PKG_DEST/usr/share/sgml/docbook/sgml-dtd-$PKG_VER &&
+
+
+ cat >> $PKG_DEST/usr/share/sgml/docbook/sgml-dtd-$PKG_VER/catalog << "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
+}
+
+postinstall () {
+ if [ ! -e /etc/xml/docbook ]; then
+ xmlcatalog --noout --create /etc/xml/docbook
+ fi
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML V4.5//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
+ /etc/xml/docbook &&
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
+ /etc/xml/docbook &&
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
+ /etc/xml/docbook &&
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
+ /etc/xml/docbook &&
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
+ /etc/xml/docbook &&
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
+ /etc/xml/docbook &&
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
+ /etc/xml/docbook &&
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
+ /etc/xml/docbook &&
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
+ /etc/xml/docbook &&
+ xmlcatalog --noout --add "rewriteSystem" \
+ "http://www.oasis-open.org/docbook/xml/4.5" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ /etc/xml/docbook &&
+ xmlcatalog --noout --add "rewriteURI" \
+ "http://www.oasis-open.org/docbook/xml/4.5" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ /etc/xml/docbook
+ if [ ! -e /etc/xml/catalog ]; then
+ xmlcatalog --noout --create /etc/xml/catalog
+ fi
+ xmlcatalog --noout --add "delegatePublic" \
+ "-//OASIS//ENTITIES DocBook XML" \
+ "file:///etc/xml/docbook" \
+ /etc/xml/catalog &&
+ xmlcatalog --noout --add "delegatePublic" \
+ "-//OASIS//DTD DocBook XML" \
+ "file:///etc/xml/docbook" \
+ /etc/xml/catalog &&
+ xmlcatalog --noout --add "delegateSystem" \
+ "http://www.oasis-open.org/docbook/" \
+ "file:///etc/xml/docbook" \
+ /etc/xml/catalog &&
+ xmlcatalog --noout --add "delegateURI" \
+ "http://www.oasis-open.org/docbook/" \
+ "file:///etc/xml/docbook" \
+ /etc/xml/catalog
+ for DTDVERSION in 4.1.2 4.2 4.3 4.4; do
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \
+ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \
+ /etc/xml/docbook
+ xmlcatalog --noout --add "rewriteSystem" \
+ "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ /etc/xml/docbook
+ xmlcatalog --noout --add "rewriteURI" \
+ "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ /etc/xml/docbook
+ xmlcatalog --noout --add "delegateSystem" \
+ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
+ "file:///etc/xml/docbook" \
+ /etc/xml/catalog
+ xmlcatalog --noout --add "delegateURI" \
+ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
+ "file:///etc/xml/docbook" \
+ /etc/xml/catalog
+done
+
+}
+