# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/*/docbookx/docbookx.conf # Copyright (C) 2008 - 2020 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the # GNU General Public License can be found in the file COPYING. # --- T2-COPYRIGHT-NOTE-END --- # TODO: this is a quickhack to have a working docbook installation to fix many packages which depend on it. # the whole installation of the docbook xml-dtds and xslts should be reworked. # best would be to define (or find out) how a standard docbook and xml-catalog installation should look # like and the registration in the system catalog should be done in a postinstall script # (other packages may also install dtds, xslts which should be registered) # after this is done, it will be possible to put every docbook version and xslt and others into # their own package. # TODO: honor prefix destdir=/usr/share/xml/docbook sysconfdir=/etc/xml systemcatalog=$sysconfdir/catalog dtdprefix=docbook-xml-dtd dtddest=$destdir/$dtdprefix register_catalog() { cd $destdir if [ ! -e $systemcatalog ]; then xmlcatalog --noout --create $systemcatalog fi for catalogfile in $1; do egrep $catalogfile $systemcatalog > /dev/null || xmlcatalog --noout --add nextCatalog "" file://$catalogfile $systemcatalog done } install_412() { unzip -o -d $dtddest-4.1.2 $archdir/$(match_source_file 412) cp -f $confdir/catalog-4.1.2.xml $dtddest-4.1.2/catalog.xml register_catalog $dtddest-4.1.2/catalog.xml } install_4_x() { for dtdver in 4.2 4.3 4.4 4.5; do unzip -o -d $dtddest-$dtdver $archdir/$(match_source_file xml-$dtdver) register_catalog $dtddest-$dtdver/catalog.xml done } install_5_x() { unzip -o -d $dtddest-5.0 $archdir/$(match_source_file docbook-5.0) register_catalog $dtddest-5.0/catalog.xml } install_xsl() { cd $destdir $compressor -d < $archdir/$(match_source_file xsl) | tar x register_catalog $destdir/docbook-xsl*/catalog.xml } install_docbook() { mkdir -p $destdir mkdir -p $sysconfdir install_412 install_4_x install_5_x install_xsl } mainfunction=install_docbook