summaryrefslogtreecommitdiffstats
path: root/abs/extra/docbook-sgml31/docbook-sgml31.install
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-02-15 20:50:44 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-02-15 20:50:44 (GMT)
commit85af7820ddf206711d890bdbd707c396824aac15 (patch)
tree8f5027cff84c69e8c6fec299b63e1ed87afc3cc3 /abs/extra/docbook-sgml31/docbook-sgml31.install
parenta593241481b9b2c8e2cc74b2587f73d0265670eb (diff)
downloadlinhes_pkgbuild-85af7820ddf206711d890bdbd707c396824aac15.zip
linhes_pkgbuild-85af7820ddf206711d890bdbd707c396824aac15.tar.gz
linhes_pkgbuild-85af7820ddf206711d890bdbd707c396824aac15.tar.bz2
docbook-sgml31: initial inclusion. dep of dockbook-utils
Diffstat (limited to 'abs/extra/docbook-sgml31/docbook-sgml31.install')
-rw-r--r--abs/extra/docbook-sgml31/docbook-sgml31.install42
1 files changed, 42 insertions, 0 deletions
diff --git a/abs/extra/docbook-sgml31/docbook-sgml31.install b/abs/extra/docbook-sgml31/docbook-sgml31.install
new file mode 100644
index 0000000..30f028a
--- /dev/null
+++ b/abs/extra/docbook-sgml31/docbook-sgml31.install
@@ -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:
+