[Lunar-commits] <moonbase> docbook: major fix, rebuild and cleanup Lunar's docbook implementation was a complete mess. Some modules had broken build when xmlto was installed because docbook imlementation was bad and broken causing xml validation to fail and break build.

Zbigniew Luszpinski zbiggy at lunar-linux.org
Sat Aug 14 22:51:15 CEST 2010


commit ba2db00198d8072622f4ba15eb8c5849242a72bc
Author: Zbigniew Luszpinski <zbiggy at lunar-linux.org>
Date:   Sat Aug 14 22:51:15 2010 +0200

    docbook: major fix, rebuild and cleanup
    Lunar's docbook implementation was a complete mess.
    Some modules had broken build when xmlto was installed because
    docbook imlementation was bad and broken causing xml validation to fail and break build.
    
    Now docbook implementation is clean, correct and always works.
    If you find any app which fails in xmlto because can not download DTD let me know.
    
    This implementation does not have yet all DTDs.
    I only added all DTD vesions found in moonbase or from complaining apps.
---
 doc-tools/docbook-3.1/BUILD                |   17 ---------
 doc-tools/docbook-3.1/DEPENDS              |    2 -
 doc-tools/docbook-3.1/DETAILS              |   16 --------
 doc-tools/docbook-3.1/POST_INSTALL         |   21 -----------
 doc-tools/docbook-3.1/POST_REMOVE          |    3 --
 doc-tools/docbook-3.1/PRE_BUILD            |    3 --
 doc-tools/docbook-3.1/PRE_REMOVE           |    4 --
 doc-tools/docbook-4.1/BUILD                |   17 ---------
 doc-tools/docbook-4.1/DEPENDS              |    2 -
 doc-tools/docbook-4.1/DETAILS              |   16 --------
 doc-tools/docbook-4.1/POST_INSTALL         |   13 -------
 doc-tools/docbook-4.1/POST_REMOVE          |    3 --
 doc-tools/docbook-4.1/PRE_BUILD            |    3 --
 doc-tools/docbook-4.1/PRE_REMOVE           |    4 --
 doc-tools/docbook-4.2/BUILD                |   17 ---------
 doc-tools/docbook-4.2/DEPENDS              |    2 -
 doc-tools/docbook-4.2/DETAILS              |   15 --------
 doc-tools/docbook-4.2/POST_INSTALL         |   13 -------
 doc-tools/docbook-4.2/POST_REMOVE          |    3 --
 doc-tools/docbook-4.2/PRE_BUILD            |    3 --
 doc-tools/docbook-4.2/PRE_REMOVE           |    4 --
 doc-tools/docbook-sgml/BUILD               |   24 +++++--------
 doc-tools/docbook-sgml/DETAILS             |   35 ++++++++++++++----
 doc-tools/docbook-sgml/POST_INSTALL        |   36 ++----------------
 doc-tools/docbook-sgml/PRE_BUILD           |   21 +++++++++--
 doc-tools/docbook-sgml/PRE_REMOVE          |    7 ++--
 doc-tools/docbook-utils/DEPENDS            |    2 +-
 doc-tools/docbook-xml/BUILD                |   26 ++++++--------
 doc-tools/docbook-xml/DEPENDS              |    2 +-
 doc-tools/docbook-xml/DETAILS              |   34 +++++++++++++-----
 doc-tools/docbook-xml/POST_INSTALL         |   55 ++++++++++++----------------
 doc-tools/docbook-xml/POST_REMOVE          |    3 --
 doc-tools/docbook-xml/PRE_BUILD            |   23 ++++++++++--
 doc-tools/docbook-xml/PRE_REMOVE           |   11 ++++--
 gnome2/desktop/gnome-power-manager/DEPENDS |    2 +-
 profiles/docbook-profile/DEPENDS           |    3 +-
 utils/discover/DEPENDS                     |    2 +-
 37 files changed, 155 insertions(+), 312 deletions(-)

diff --git a/doc-tools/docbook-3.1/BUILD b/doc-tools/docbook-3.1/BUILD
deleted file mode 100644
index e156fb2..0000000
--- a/doc-tools/docbook-3.1/BUILD
+++ /dev/null
@@ -1,17 +0,0 @@
-(
-  TARGET=/usr/share/sgml/docbook/$VERSION
- 
-  prepare_install &&
-  if ! [ -d "$TARGET" ]; then
-       mkdir -p $TARGET
-  fi &&
-  
-  rm -rf $SOURCE_DIRECTORY/old.libraries &&
-
-  for DFILE in $SOURCE_DIRECTORY/*; do
-        install -m644 $DFILE $TARGET/
-  done &&
-
-  ln -sf $TARGET/docbook.cat $TARGET/catalog  
-  
-) > $C_FIFO 2>&1
diff --git a/doc-tools/docbook-3.1/DEPENDS b/doc-tools/docbook-3.1/DEPENDS
deleted file mode 100644
index e2b13be..0000000
--- a/doc-tools/docbook-3.1/DEPENDS
+++ /dev/null
@@ -1,2 +0,0 @@
-depends sgml-common
-depends unzip
diff --git a/doc-tools/docbook-3.1/DETAILS b/doc-tools/docbook-3.1/DETAILS
deleted file mode 100644
index de321d7..0000000
--- a/doc-tools/docbook-3.1/DETAILS
+++ /dev/null
@@ -1,16 +0,0 @@
-          MODULE=docbook-3.1
-             MOD=docbk31
-         VERSION=3.1
-          SOURCE=$MOD.zip
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/tmp
-   SOURCE_URL[0]=ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/
-   SOURCE_URL[1]=http://download.lunar-linux.org/lunar/mirrors/
-      SOURCE_VFY=sha1:75a5bb4f17b17ff0f7dd1cc2db7112bad0fb89e6
-        WEB_SITE=http://www.oasis-open.org
-         ENTERED=20030723
-         UPDATED=20030804
-           SHORT="The DocBook 3.1 DTD"
-
-cat << EOF
-The Docbook 3.1 DTD's.
-EOF
diff --git a/doc-tools/docbook-3.1/POST_INSTALL b/doc-tools/docbook-3.1/POST_INSTALL
deleted file mode 100644
index dde56b6..0000000
--- a/doc-tools/docbook-3.1/POST_INSTALL
+++ /dev/null
@@ -1,21 +0,0 @@
-CENTRALIZED=/etc/sgml/catalog 
-DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$VERSION
-
-if ! [ -e "$CENTRALIZED" ]; then
-     echo "Creating $CENTRALIZED"
-     mkdir -p /etc/sgml
-     touch $CENTRALIZED
-fi
-
-install-catalog --remove $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
-
-install-catalog --add $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
-install-catalog --remove $CENTRALIZED /etc/sgml/catalog
-
-cat >> /usr/share/sgml/docbook/3.1/catalog << "EOF"
-  -- Begin Single Major Version catalog changes --
-
-PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd"
-
-  -- End Single Major Version catalog changes --
-EOF
diff --git a/doc-tools/docbook-3.1/POST_REMOVE b/doc-tools/docbook-3.1/POST_REMOVE
deleted file mode 100644
index 800da97..0000000
--- a/doc-tools/docbook-3.1/POST_REMOVE
+++ /dev/null
@@ -1,3 +0,0 @@
-# Cleanup
-
-rm -rf /usr/share/sgml/docbook/$VERSION
diff --git a/doc-tools/docbook-3.1/PRE_BUILD b/doc-tools/docbook-3.1/PRE_BUILD
deleted file mode 100644
index 8b474ad..0000000
--- a/doc-tools/docbook-3.1/PRE_BUILD
+++ /dev/null
@@ -1,3 +0,0 @@
-mk_source_dir $SOURCE_DIRECTOY &&
-unzip $SOURCE_CACHE/$SOURCE -d $SOURCE_DIRECTORY
-  
diff --git a/doc-tools/docbook-3.1/PRE_REMOVE b/doc-tools/docbook-3.1/PRE_REMOVE
deleted file mode 100644
index 45e2b7c..0000000
--- a/doc-tools/docbook-3.1/PRE_REMOVE
+++ /dev/null
@@ -1,4 +0,0 @@
-CENTRALIZED=/etc/sgml/catalog 
-DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$VERSION
-
-install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
diff --git a/doc-tools/docbook-4.1/BUILD b/doc-tools/docbook-4.1/BUILD
deleted file mode 100644
index e156fb2..0000000
--- a/doc-tools/docbook-4.1/BUILD
+++ /dev/null
@@ -1,17 +0,0 @@
-(
-  TARGET=/usr/share/sgml/docbook/$VERSION
- 
-  prepare_install &&
-  if ! [ -d "$TARGET" ]; then
-       mkdir -p $TARGET
-  fi &&
-  
-  rm -rf $SOURCE_DIRECTORY/old.libraries &&
-
-  for DFILE in $SOURCE_DIRECTORY/*; do
-        install -m644 $DFILE $TARGET/
-  done &&
-
-  ln -sf $TARGET/docbook.cat $TARGET/catalog  
-  
-) > $C_FIFO 2>&1
diff --git a/doc-tools/docbook-4.1/DEPENDS b/doc-tools/docbook-4.1/DEPENDS
deleted file mode 100644
index e2b13be..0000000
--- a/doc-tools/docbook-4.1/DEPENDS
+++ /dev/null
@@ -1,2 +0,0 @@
-depends sgml-common
-depends unzip
diff --git a/doc-tools/docbook-4.1/DETAILS b/doc-tools/docbook-4.1/DETAILS
deleted file mode 100644
index f26e294..0000000
--- a/doc-tools/docbook-4.1/DETAILS
+++ /dev/null
@@ -1,16 +0,0 @@
-          MODULE=docbook-4.1
-             MOD=docbk41
-         VERSION=4.1
-          SOURCE=$MOD.zip
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/tmp-$MODULE
-   SOURCE_URL[0]=http://docbook.org/sgml/4.1/
-   SOURCE_URL[1]=http://download.lunar-linux.org/lunar/mirrors/
-      SOURCE_VFY=sha1:3009fcc364511d186da40e828bf0d5d1556c020e
-        WEB_SITE=http://www.oasis-open.org
-         ENTERED=20050217
-         UPDATED=20050217
-           SHORT="The DocBook 4.1 DTD"
-
-cat << EOF
-The Docbook 4.1 DTD's.
-EOF
diff --git a/doc-tools/docbook-4.1/POST_INSTALL b/doc-tools/docbook-4.1/POST_INSTALL
deleted file mode 100644
index 12431ea..0000000
--- a/doc-tools/docbook-4.1/POST_INSTALL
+++ /dev/null
@@ -1,13 +0,0 @@
-CENTRALIZED=/etc/sgml/catalog 
-DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$VERSION
-
-if ! [ -e "$CENTRALIZED" ]; then
-     echo "Creating $CENTRALIZED"
-     mkdir -p /etc/sgml
-     touch $CENTRALIZED
-fi
-
-install-catalog --remove $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
-
-install-catalog --add $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
-install-catalog --remove $CENTRALIZED /etc/sgml/catalog
diff --git a/doc-tools/docbook-4.1/POST_REMOVE b/doc-tools/docbook-4.1/POST_REMOVE
deleted file mode 100644
index 800da97..0000000
--- a/doc-tools/docbook-4.1/POST_REMOVE
+++ /dev/null
@@ -1,3 +0,0 @@
-# Cleanup
-
-rm -rf /usr/share/sgml/docbook/$VERSION
diff --git a/doc-tools/docbook-4.1/PRE_BUILD b/doc-tools/docbook-4.1/PRE_BUILD
deleted file mode 100644
index 8b474ad..0000000
--- a/doc-tools/docbook-4.1/PRE_BUILD
+++ /dev/null
@@ -1,3 +0,0 @@
-mk_source_dir $SOURCE_DIRECTOY &&
-unzip $SOURCE_CACHE/$SOURCE -d $SOURCE_DIRECTORY
-  
diff --git a/doc-tools/docbook-4.1/PRE_REMOVE b/doc-tools/docbook-4.1/PRE_REMOVE
deleted file mode 100644
index 45e2b7c..0000000
--- a/doc-tools/docbook-4.1/PRE_REMOVE
+++ /dev/null
@@ -1,4 +0,0 @@
-CENTRALIZED=/etc/sgml/catalog 
-DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$VERSION
-
-install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
diff --git a/doc-tools/docbook-4.2/BUILD b/doc-tools/docbook-4.2/BUILD
deleted file mode 100644
index eab6a89..0000000
--- a/doc-tools/docbook-4.2/BUILD
+++ /dev/null
@@ -1,17 +0,0 @@
-(
-  TARGET=/usr/share/sgml/docbook/$VERSION
-
-  prepare_install &&
-  if ! [ -d "$TARGET" ]; then
-       mkdir -p $TARGET
-  fi &&
-
-  rm -rf $SOURCE_DIRECTORY/old.libraries &&
-
-  for DFILE in $SOURCE_DIRECTORY/*; do
-        install -m644 $DFILE $TARGET/
-  done &&
-
-  ln -sf $TARGET/docbook.cat $TARGET/catalog
-
-) > $C_FIFO 2>&1
diff --git a/doc-tools/docbook-4.2/DEPENDS b/doc-tools/docbook-4.2/DEPENDS
deleted file mode 100644
index e2b13be..0000000
--- a/doc-tools/docbook-4.2/DEPENDS
+++ /dev/null
@@ -1,2 +0,0 @@
-depends sgml-common
-depends unzip
diff --git a/doc-tools/docbook-4.2/DETAILS b/doc-tools/docbook-4.2/DETAILS
deleted file mode 100644
index 5a436a9..0000000
--- a/doc-tools/docbook-4.2/DETAILS
+++ /dev/null
@@ -1,15 +0,0 @@
-          MODULE=docbook-4.2
-         VERSION=4.2
-          SOURCE=$MODULE.zip
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/tmp-$MODULE
-   SOURCE_URL[0]=http://docbook.org/sgml/4.2/
-   SOURCE_URL[1]=http://download.lunar-linux.org/lunar/mirrors/
-      SOURCE_VFY=sha1:98afcae616ed24edb30e40baa4ddd8cd8731f2c7
-        WEB_SITE=http://www.oasis-open.org
-         ENTERED=20050217
-         UPDATED=20050217
-           SHORT="The DocBook 4.2 DTD"
-
-cat << EOF
-The Docbook 4.2 DTD's.
-EOF
diff --git a/doc-tools/docbook-4.2/POST_INSTALL b/doc-tools/docbook-4.2/POST_INSTALL
deleted file mode 100644
index 12431ea..0000000
--- a/doc-tools/docbook-4.2/POST_INSTALL
+++ /dev/null
@@ -1,13 +0,0 @@
-CENTRALIZED=/etc/sgml/catalog 
-DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$VERSION
-
-if ! [ -e "$CENTRALIZED" ]; then
-     echo "Creating $CENTRALIZED"
-     mkdir -p /etc/sgml
-     touch $CENTRALIZED
-fi
-
-install-catalog --remove $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
-
-install-catalog --add $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
-install-catalog --remove $CENTRALIZED /etc/sgml/catalog
diff --git a/doc-tools/docbook-4.2/POST_REMOVE b/doc-tools/docbook-4.2/POST_REMOVE
deleted file mode 100644
index 800da97..0000000
--- a/doc-tools/docbook-4.2/POST_REMOVE
+++ /dev/null
@@ -1,3 +0,0 @@
-# Cleanup
-
-rm -rf /usr/share/sgml/docbook/$VERSION
diff --git a/doc-tools/docbook-4.2/PRE_BUILD b/doc-tools/docbook-4.2/PRE_BUILD
deleted file mode 100644
index 8b474ad..0000000
--- a/doc-tools/docbook-4.2/PRE_BUILD
+++ /dev/null
@@ -1,3 +0,0 @@
-mk_source_dir $SOURCE_DIRECTOY &&
-unzip $SOURCE_CACHE/$SOURCE -d $SOURCE_DIRECTORY
-  
diff --git a/doc-tools/docbook-4.2/PRE_REMOVE b/doc-tools/docbook-4.2/PRE_REMOVE
deleted file mode 100644
index 45e2b7c..0000000
--- a/doc-tools/docbook-4.2/PRE_REMOVE
+++ /dev/null
@@ -1,4 +0,0 @@
-CENTRALIZED=/etc/sgml/catalog 
-DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$VERSION
-
-install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
diff --git a/doc-tools/docbook-sgml/BUILD b/doc-tools/docbook-sgml/BUILD
index 673f356..70e8149 100644
--- a/doc-tools/docbook-sgml/BUILD
+++ b/doc-tools/docbook-sgml/BUILD
@@ -1,22 +1,16 @@
 (
-  TARGET=/usr/share/sgml/docbook/$MODULE-$VERSION
 
-  # We need to remove the old catalog entries
-  if module_is_expired $MODULE ; then
-        set_module_config OLD_VER "`installed_version $MODULE`"
-  fi &&
+  find $BUILD_DIRECTORY/sgml -type d -exec chmod 755 {} \;
+  find $BUILD_DIRECTORY/sgml -type f -exec chmod 644 {} \;
 
-  prepare_install &&
-  if ! [ -d "$TARGET" ]; then
-       mkdir -p $TARGET
-  fi &&
-
-  rm -rf $SOURCE_DIRECTORY/old.libraries &&
-
-  for DFILE in $SOURCE_DIRECTORY/*; do
-        install -m644 $DFILE $TARGET/
+  for DOCBOOK in `ls`; do
+      cd $DOCBOOK
+      ln -sf docbook.cat catalog
+      cd ..
   done &&
 
-  ln -sf $TARGET/docbook.cat $TARGET/catalog
+  prepare_install &&
+  rm -rf old.libraries &&
+  cp -a $BUILD_DIRECTORY/sgml /usr/share/sgml/docbook
 
 ) > $C_FIFO 2>&1
diff --git a/doc-tools/docbook-sgml/DETAILS b/doc-tools/docbook-sgml/DETAILS
index 02f51fd..397dbd5 100644
--- a/doc-tools/docbook-sgml/DETAILS
+++ b/doc-tools/docbook-sgml/DETAILS
@@ -1,13 +1,34 @@
+# All docbook packages are NOT cumulative so do NOT replace old releases with new one
+# If you need to add new docbook release add it as another SOURCE.
+# You have to review all scripts in this module to modify them to add another source.
           MODULE=docbook-sgml
              MOD=docbook
-         VERSION=4.3
-          SOURCE=$MOD-$VERSION.zip
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/tmp-$MODULE
-      SOURCE_URL=http://www.oasis-open.org/docbook/sgml/4.3/
-        WEB_SITE=http://www.oasis-open.org/docbook/sgml/4.3/index.shtml
+         VERSION=4.5
+          SOURCE1=docbk31.zip
+          SOURCE2=docbk41.zip
+          SOURCE3=$MOD-4.2.zip
+          SOURCE4=$MOD-4.3.zip
+          SOURCE5=$MOD-$VERSION.zip
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/sgml
+      SOURCE5_URL[0]=http://www.oasis-open.org/docbook/sgml/4.5
+      SOURCE5_URL[1]=http://www.docbook.org/sgml/4.5
+      SOURCE4_URL[0]=http://www.oasis-open.org/docbook/sgml/4.3
+      SOURCE4_URL[1]=http://www.docbook.org/sgml/4.3
+      SOURCE3_URL[0]=http://www.oasis-open.org/docbook/sgml/4.2
+      SOURCE3_URL[1]=http://www.docbook.org/sgml/4.2
+      SOURCE2_URL[0]=http://www.oasis-open.org/docbook/sgml/4.1
+      SOURCE2_URL[1]=http://www.docbook.org/sgml/4.1
+      SOURCE1_URL[0]=http://www.oasis-open.org/docbook/sgml/3.1
+      SOURCE1_URL[1]=http://www.docbook.org/sgml/3.1
+     SOURCE1_VFY=sha1:75a5bb4f17b17ff0f7dd1cc2db7112bad0fb89e6
+     SOURCE2_VFY=sha1:3009fcc364511d186da40e828bf0d5d1556c020e
+     SOURCE3_VFY=sha1:98afcae616ed24edb30e40baa4ddd8cd8731f2c7
+     SOURCE4_VFY=sha1:c64759d07514a7ab4347b1fc03457664cdf98b3f
+     SOURCE5_VFY=sha1:5efeb22936ea30cdaf88053337de7966dfda02bd
+        WEB_SITE=http://www.oasis-open.org/docbook/sgml
          ENTERED=20030103
-         UPDATED=20050215
-           SHORT="The DocBook SGML DTD"
+         UPDATED=20100814
+           SHORT="The DocBook SGML DTD pack"
 cat << EOF
 
 DocBook is an XML/SGML vocabulary particularly well suited to books 
diff --git a/doc-tools/docbook-sgml/POST_INSTALL b/doc-tools/docbook-sgml/POST_INSTALL
index 4204c31..89a6314 100644
--- a/doc-tools/docbook-sgml/POST_INSTALL
+++ b/doc-tools/docbook-sgml/POST_INSTALL
@@ -1,39 +1,11 @@
-OLD_VER=`get_module_config OLD_VER`
 CENTRALIZED=/etc/sgml/catalog 
-CATALOGDIR=/usr/share/sgml/docbook/$MODULE-$VERSION
-CATALOGDIR_OLD=/usr/share/sgml/docbook/$MODULE-$OLD_VER
-
 if ! [ -e "$CENTRALIZED" ]; then
      echo "Creating $CENTRALIZED"
      mkdir -p /etc/sgml
      touch $CENTRALIZED
 fi
 
-if [ ! -z $OLD_VER ]; then
-  install-catalog --remove $CENTRALIZED $CATALOGDIR_OLD/catalog
-fi
-
-install-catalog --remove $CENTRALIZED $CATALOGDIR/catalog
-
-install-catalog --add $CENTRALIZED $CATALOGDIR/catalog
-install-catalog --remove $CENTRALIZED /etc/sgml/catalog
-
-if ! grep -q "/usr/share/sgml/docbook/$MODULE-$VERSION" $CENTRALIZED; then
-   /usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR
-fi
-
-# I am skipping this for now since it brings up problems with
-# the modules using docbook definitions below 4.3
-
-# We do not have any other docbook's installed
-#cat >> $CATALOGDIR/catalog << "EOF"
-#  -- Begin Single Major Version catalog changes --
-#
-#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
-
-unset_module_config OLD_VER
+for DOCBOOK_INSTALL_DIR in `ls -d /usr/share/sgml/docbook/sgml/*`
+do
+install-catalog --add $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
+done
diff --git a/doc-tools/docbook-sgml/PRE_BUILD b/doc-tools/docbook-sgml/PRE_BUILD
index 8b474ad..b9570c4 100644
--- a/doc-tools/docbook-sgml/PRE_BUILD
+++ b/doc-tools/docbook-sgml/PRE_BUILD
@@ -1,3 +1,18 @@
-mk_source_dir $SOURCE_DIRECTOY &&
-unzip $SOURCE_CACHE/$SOURCE -d $SOURCE_DIRECTORY
-  
+mk_source_dir $SOURCE_DIRECTORY &&
+cd $SOURCE_DIRECTORY &&
+mkdir 3.1 &&
+mkdir 4.1 &&
+mkdir 4.2 &&
+mkdir 4.3 &&
+mkdir 4.5 &&
+unzip $SOURCE_CACHE/$SOURCE1 -d $SOURCE_DIRECTORY/3.1 &&
+unzip $SOURCE_CACHE/$SOURCE2 -d $SOURCE_DIRECTORY/4.1 &&
+unzip $SOURCE_CACHE/$SOURCE3 -d $SOURCE_DIRECTORY/4.2 &&
+unzip $SOURCE_CACHE/$SOURCE4 -d $SOURCE_DIRECTORY/4.3 &&
+unzip $SOURCE_CACHE/$SOURCE5 -d $SOURCE_DIRECTORY/4.5 &&
+mkdir old.libraries &&
+touch old.libraries/dontbreak &&
+CENTRALIZED=/etc/sgml/catalog
+for DOCBOOK_INSTALL_DIR in `ls -d /usr/share/sgml/docbook/{3*,4*,docbook-sgml*,sgml}`
+do install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog; done
+rm -rf /usr/share/sgml/docbook/{3*,4*,docbook-sgml-*,old.libraries,sgml}
diff --git a/doc-tools/docbook-sgml/PRE_REMOVE b/doc-tools/docbook-sgml/PRE_REMOVE
index 65eaffe..2afd395 100644
--- a/doc-tools/docbook-sgml/PRE_REMOVE
+++ b/doc-tools/docbook-sgml/PRE_REMOVE
@@ -1,4 +1,5 @@
-CENTRALIZED=/etc/sgml/catalog 
-DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$MODULE-$VERSION
-
+CENTRALIZED=/etc/sgml/catalog
+for DOCBOOK_INSTALL_DIR in `ls -d /usr/share/sgml/docbook/sgml/*`
+do
 install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
+done
diff --git a/doc-tools/docbook-utils/DEPENDS b/doc-tools/docbook-utils/DEPENDS
index 5b4bb46..8799f43 100644
--- a/doc-tools/docbook-utils/DEPENDS
+++ b/doc-tools/docbook-utils/DEPENDS
@@ -1,3 +1,3 @@
-depends  docbook-3.1
+depends  docbook-smgl
 depends  SGMLSpm
 depends  docbook-dsssl
diff --git a/doc-tools/docbook-xml/BUILD b/doc-tools/docbook-xml/BUILD
index 9099a8e..4a9685b 100644
--- a/doc-tools/docbook-xml/BUILD
+++ b/doc-tools/docbook-xml/BUILD
@@ -1,21 +1,17 @@
 (
-  TARGET=/usr/share/sgml/docbook/$MODULE-$VERSION
 
-  # We need to remove the old catalog entries upon an update
-  if module_is_expired $MODULE ; then
-        set_module_config OLD_VER "`installed_version $MODULE`"
-  fi &&
+  find $BUILD_DIRECTORY/xml -type d -exec chmod 755 {} \;
+  find $BUILD_DIRECTORY/xml -type f -exec chmod 644 {} \;
 
-  prepare_install &&
-  if ! [ -d "$TARGET" ]; then
-       mkdir -p $TARGET
-  fi &&
-
-  rm -rf $SOURCE_DIRECTORY/old.libraries &&
+  for DOCBOOK in `ls`; do
+      cd $DOCBOOK
+      ln -sf docbook.cat catalog
+      cd ..
+  done &&
 
-  cp -a $SOURCE_DIRECTORY/* $TARGET/ &&
-  install -m755 $SOURCE_CACHE/$SOURCE2 /usr/bin/ &&
-
-  ln -sf $TARGET/docbook.cat $TARGET/catalog
+  prepare_install &&
+  rm -rf old.libraries &&
+  cp -a $BUILD_DIRECTORY/xml /usr/share/sgml/docbook &&
+  install -m755 $SOURCE_CACHE/$SOURCE2 /usr/bin
 
 ) > $C_FIFO 2>&1
diff --git a/doc-tools/docbook-xml/DEPENDS b/doc-tools/docbook-xml/DEPENDS
index 45cc338..3a89c09 100644
--- a/doc-tools/docbook-xml/DEPENDS
+++ b/doc-tools/docbook-xml/DEPENDS
@@ -1,4 +1,4 @@
+depends docbook-sgml
 depends openjade
 depends docbook-xsl
-depends docbook-sgml
 depends unzip
diff --git a/doc-tools/docbook-xml/DETAILS b/doc-tools/docbook-xml/DETAILS
index 53ba778..facab89 100644
--- a/doc-tools/docbook-xml/DETAILS
+++ b/doc-tools/docbook-xml/DETAILS
@@ -1,16 +1,32 @@
           MODULE=docbook-xml
-         VERSION=4.3
-          SOURCE=$MODULE-$VERSION.zip
+         VERSION=4.5
+         SOURCE1=$MODULE-4.3.zip
          SOURCE2=buildDocBookCatalog
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/tmp-$MODULE
-   SOURCE_URL[0]=http://www.docbook.org/xml/4.3/
-   SOURCE_URL[1]=$LRESORT_URL/
-     SOURCE2_URL=http://xmlsoft.org/
-      SOURCE_VFY=sha1:e79a59e9164c1013b8cc9f64f96f909a184ca016
+         SOURCE3=$MODULE-4.5.zip
+         SOURCE4=docbkx412.zip
+	 SOURCE5=$MODULE-4.2.zip
+	 SOURCE6=$MODULE-4.4.zip
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/xml
+  SOURCE1_URL[0]=http://www.oasis-open.org/docbook/xml/4.3
+  SOURCE1_URL[1]=http://www.docbook.org/xml/4.3
+  SOURCE2_URL[0]=http://xmlsoft.org
+  SOURCE3_URL[0]=http://www.oasis-open.org/docbook/xml/4.5
+  SOURCE3_URL[1]=http://www.docbook.org/xml/4.5
+  SOURCE4_URL[0]=http://www.oasis-open.org/docbook/xml/4.1.2
+  SOURCE4_URL[1]=http://www.docbook.org/xml/4.1.2
+  SOURCE5_URL[0]=http://www.oasis-open.org/docbook/xml/4.2
+  SOURCE5_URL[1]=http://www.docbook.org/xml/4.2
+  SOURCE6_URL[0]=http://www.oasis-open.org/docbook/xml/4.4
+  SOURCE6_URL[1]=http://www.docbook.org/xml/4.4
+       SOURCE1_VFY=sha1:e79a59e9164c1013b8cc9f64f96f909a184ca016
      SOURCE2_VFY=sha1:9890a7505713a5c78b038f7e5a2b9e06d6f96f1d
-        WEB_SITE=http://www.docbook.org/xml/
+     SOURCE3_VFY=sha1:b9124233b50668fb508773aa2b3ebc631d7c1620
+     SOURCE4_VFY=sha1:b9ae7a41056bfaf885581812d60651b7b5531519
+     SOURCE5_VFY=sha1:5e3a35663cd028c5c5fbb959c3858fec2d7f8b9e
+     SOURCE6_VFY=sha1:7c4d91c82ad3747e1b5600c91782758e5d91c22b
+        WEB_SITE=http://www.oasis-open.org/docbook/xml
          ENTERED=20030103
-         UPDATED=20040919
+         UPDATED=20100814
            SHORT="The DocBook XML DTD"
 
 cat << EOF
diff --git a/doc-tools/docbook-xml/POST_INSTALL b/doc-tools/docbook-xml/POST_INSTALL
index a77c51f..f3b0e8e 100644
--- a/doc-tools/docbook-xml/POST_INSTALL
+++ b/doc-tools/docbook-xml/POST_INSTALL
@@ -1,51 +1,42 @@
-OLD_VER=`get_module_config OLD_VER`
 CENTRALIZED=/etc/sgml/catalog 
-CATALOGDIR=/usr/share/sgml/docbook/$MODULE-$VERSION
-CATALOGDIR_OLD="/usr/share/sgml/$MODULE-$OLD_VER"
-XML_PREFIX=/etc/xml
-DOCBOOK_XML_VER=`installed_version docbook-xml`
-
-echo "Adding catalog for $MODULE-$VERSION to $CENTRALIZED"
-
-# Now we are handling the update
-if [ ! -z $OLD_VER ]; then
-  install-catalog --remove $CENTRALIZED $CATALOGDIR_OLD/catalog
+if ! [ -e "$CENTRALIZED" ]; then
+     echo "Creating $CENTRALIZED"
+     mkdir -p /etc/sgml
+     touch $CENTRALIZED
 fi
 
-install-catalog --remove $CENTRALIZED $CATALOGDIR/catalog
-
-install-catalog --add $CENTRALIZED $CATALOGDIR/catalog
-install-catalog --remove $CENTRALIZED /etc/sgml/catalog
+for DOCBOOK_INSTALL_DIR in `ls -d /usr/share/sgml/docbook/xml/*`
+do
+install-catalog --add $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
+done
+rm -rf /usr/share/sgml/docbook/old.libraries
 
-echo "Adding xml catalogs for $MODULE-$VERSION to $XML_PREFIX/catalog"
-/usr/bin/$SOURCE2 --prefix=$XML_PREFIX --version=$DOCBOOK_XML_VER
+/usr/bin/$SOURCE2 --prefix=/etc/xml --version=4.1.2
+/usr/bin/$SOURCE2 --prefix=/etc/xml --version=4.2
+/usr/bin/$SOURCE2 --prefix=/etc/xml --version=4.3
+/usr/bin/$SOURCE2 --prefix=/etc/xml --version=4.4
+/usr/bin/$SOURCE2 --prefix=/etc/xml --version=4.5
 
 (
 
 xmlcatalog --noout --add "public" \
     "-//OASIS//DTD DocBook XML V4.1.2//EN" \
-    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \
+    "file:///usr/share/sgml/docbook/xml/4.1.2/docbookx.dtd" \
     /etc/xml/docbook &&
 xmlcatalog --noout --add "delegateSystem" \
-    "http://www.oasis-open.org/docbook/xml/4.1.2/" \
-    "file:///etc/xml/docbook" /etc/xml/catalog &&
+    "http://www.oasis-open.org/" \
+    "file:///usr/share/sgml" /etc/xml/catalog &&
 xmlcatalog --noout --add "delegateURI" \
-    "http://www.oasis-open.org/docbook/xml/4.1.2/" \
-    "file:///etc/xml/docbook" /etc/xml/catalog &&
+    "http://www.oasis-open.org" \
+    "file:///usr/share/sgml" /etc/xml/catalog &&
 xmlcatalog --noout --add "rewriteSystem" \
-    "http://www.oasis-open.org/docbook/xml/4.1.2" \
-    "file://$CATALOGDIR" \
+    "http://www.oasis-open.org" \
+    "file:///usr/share/sgml" \
     /etc/xml/docbook &&
 xmlcatalog --noout --add "rewriteURI" \
-    "http://www.oasis-open.org/docbook/xml/4.1.2" \
-    "file://$CATALOGDIR" \
-    /etc/xml/docbook &&
-xmlcatalog --noout --add "rewriteURI" \
-    "http://www.oasis-open.org/docbook/xml/4.2" \
-    "file://$CATALOGDIR" \
+    "http://www.oasis-open.org" \
+    "file:///usr/share/sgml" \
     /etc/xml/docbook
 )
 
 if module_installed scrollkeeper; then lin -c scrollkeeper; fi
-
-unset_module_config OLD_VER
diff --git a/doc-tools/docbook-xml/POST_REMOVE b/doc-tools/docbook-xml/POST_REMOVE
deleted file mode 100644
index 06339b0..0000000
--- a/doc-tools/docbook-xml/POST_REMOVE
+++ /dev/null
@@ -1,3 +0,0 @@
-#this takes care of the old install directory
-
-rm -rf /usr/share/sgml/docbook/$MODULE-$VERSION
diff --git a/doc-tools/docbook-xml/PRE_BUILD b/doc-tools/docbook-xml/PRE_BUILD
index 8b474ad..6047961 100644
--- a/doc-tools/docbook-xml/PRE_BUILD
+++ b/doc-tools/docbook-xml/PRE_BUILD
@@ -1,3 +1,20 @@
-mk_source_dir $SOURCE_DIRECTOY &&
-unzip $SOURCE_CACHE/$SOURCE -d $SOURCE_DIRECTORY
-  
+mk_source_dir $SOURCE_DIRECTORY &&
+cd $SOURCE_DIRECTORY &&
+mkdir 4.1.2 &&
+mkdir 4.2 &&
+mkdir 4.3 &&
+mkdir 4.4 &&
+mkdir 4.5 &&
+unzip $SOURCE_CACHE/$SOURCE4 -d $SOURCE_DIRECTORY/4.1.2 &&
+unzip $SOURCE_CACHE/$SOURCE5 -d $SOURCE_DIRECTORY/4.2 &&
+unzip $SOURCE_CACHE/$SOURCE1 -d $SOURCE_DIRECTORY/4.3 &&
+unzip $SOURCE_CACHE/$SOURCE6 -d $SOURCE_DIRECTORY/4.4 &&
+unzip $SOURCE_CACHE/$SOURCE3 -d $SOURCE_DIRECTORY/4.5 &&
+mkdir old.libraries &&
+touch old.libraries/dontbreak &&
+CENTRALIZED=/etc/sgml/catalog
+for DOCBOOK_INSTALL_DIR in `ls -d /usr/share/sgml/docbook/docbook-xml*`
+do install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog; done
+for DOCBOOK_INSTALL_DIR in `ls -d /usr/share/sgml/docbook/xml`
+do install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog; done
+rm -rf /usr/share/sgml/docbook/{docbook-xml-*,xml,old.libraries}
diff --git a/doc-tools/docbook-xml/PRE_REMOVE b/doc-tools/docbook-xml/PRE_REMOVE
index 65eaffe..a7ab109 100644
--- a/doc-tools/docbook-xml/PRE_REMOVE
+++ b/doc-tools/docbook-xml/PRE_REMOVE
@@ -1,4 +1,9 @@
-CENTRALIZED=/etc/sgml/catalog 
-DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$MODULE-$VERSION
-
+CENTRALIZED=/etc/sgml/catalog
+for DOCBOOK_INSTALL_DIR in `ls -d /usr/share/sgml/docbook/docbook-xml*`
+do
 install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
+done
+for DOCBOOK_INSTALL_DIR in `ls -d /usr/share/sgml/docbook/xml/*`
+do
+install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
+done
diff --git a/gnome2/desktop/gnome-power-manager/DEPENDS b/gnome2/desktop/gnome-power-manager/DEPENDS
index e3ff55e..75d78d4 100644
--- a/gnome2/desktop/gnome-power-manager/DEPENDS
+++ b/gnome2/desktop/gnome-power-manager/DEPENDS
@@ -5,4 +5,4 @@ depends  libwnck
 depends  gnome-panel
 depends  gstreamer-10
 depends  libcanberra
-depends  docbook-4.1
+depends  docbook-smgl
diff --git a/profiles/docbook-profile/DEPENDS b/profiles/docbook-profile/DEPENDS
index d2e6949..e8f1e55 100644
--- a/profiles/docbook-profile/DEPENDS
+++ b/profiles/docbook-profile/DEPENDS
@@ -1,8 +1,7 @@
+depends  docbook-sgml
 depends  docbook-xml
 depends  docbook-dsssl
 depends  docbook-dsssl-doc
-depends  docbook-4.1
-depends  docbook-4.2
 depends  docbook-utils
 depends  scrollkeeper
 
diff --git a/utils/discover/DEPENDS b/utils/discover/DEPENDS
index 9aaad3a..2e83f7b 100644
--- a/utils/discover/DEPENDS
+++ b/utils/discover/DEPENDS
@@ -2,4 +2,4 @@ depends discover-data
 depends expat
 depends check
 
-optional_depends "docbook-4.1" "" "" "to install manpages"
+optional_depends "docbook-smgl" "" "" "to install manpages"


More information about the Lunar-commits mailing list