* updated maddy (0.7.1 -> 0.8.1), untested
[t2sde.git] / package / textproc / docbook-xml / docbook-xml.conf
blob6a806edeb7adbcb4a5a018090800d11f28e31802
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/docbook-xml/docbook-xml.conf
3 # Copyright (C) 2008 - 2024 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 # TODO: this is a quickhack to have a working docbook installation to fix many packages which depend on it.
13 #       the whole installation of the docbook xml-dtds and xslts should be reworked.
14 #       best would be to define (or find out) how a standard docbook and xml-catalog installation should look
15 #       like and the registration in the system catalog should be done in a postinstall script
16 #       (other packages may also install dtds, xslts which should be registered)
17 #       after this is done, it will be possible to put every docbook version and xslt and others into
18 #       their own package.
19 # TODO: honor prefix
21 autoextract=0
23 destdir=/usr/share/xml/docbook
24 sysconfdir=/etc/xml
26 systemcatalog=$sysconfdir/catalog
27 dtdprefix=docbook-xml-dtd
28 dtddest=$destdir/$dtdprefix
30 register_catalog() {
31   cd $destdir
32   if [ ! -e $systemcatalog ]; then
33     xmlcatalog --noout --create $systemcatalog
34   fi
35   for catalogfile in $1; do
36     egrep -q $catalogfile $systemcatalog ||
37         xmlcatalog --noout --add nextCatalog "" file://$catalogfile $systemcatalog
38   done
41 install_412() {
42   unzip -o -d $dtddest-4.1.2 $archdir/$(match_source_file 412)
43   cp -f $confdir/catalog-4.1.2.xml $dtddest-4.1.2/catalog.xml
44   register_catalog $dtddest-4.1.2/catalog.xml
47 install_4_x() {
48   for dtdver in 4.2 4.3 4.4 4.5; do
49     unzip -o -d $dtddest-$dtdver $archdir/$(match_source_file xml-$dtdver)
50     register_catalog $dtddest-$dtdver/catalog.xml
51   done
54 install_5_x() {
55   for dtdver in 5.0 v5.1; do
56     unzip -o -d $dtddest-$dtdver $archdir/$(match_source_file docbook-$dtdver)
57     register_catalog $dtddest-$dtdver/catalog.xml
58   done
61 install_xsl() {
62   cd $destdir
63   register_catalog $destdir/docbook-xsl*/catalog.xml
66 install_docbook() {
67   mkdir -p $destdir
68   mkdir -p $sysconfdir
69   install_412
70   install_4_x
71   install_5_x
72   install_xsl
74 mainfunction=install_docbook