# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/docbookx/docbookx.conf # Copyright (C) 2008 - 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # 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 version 2. # --- 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 -q $catalogfile $systemcatalog || 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() { for dtdver in 5.0 v5.1; do unzip -o -d $dtddest-$dtdver $archdir/$(match_source_file docbook-$dtdver) register_catalog $dtddest-$dtdver/catalog.xml done } install_xsl() { cd $destdir tar xf $archdir/$(match_source_file xsl) register_catalog $destdir/docbook-xsl*/catalog.xml cd docbook-xsl*1.79.2* patch -p1 < $confdir/hotfix.patch.docbook-xsl } install_docbook() { mkdir -p $destdir mkdir -p $sysconfdir install_412 install_4_x install_5_x install_xsl } mainfunction=install_docbook