[Lunar-commits] CVS: moonbase/doc-tools/docbook-xml BUILD, 1.2, 1.3 DEPENDS, 1.2, 1.3 DETAILS, 1.5, 1.6 POST_INSTALL, 1.4, 1.5 POST_REMOVE, 1.1, 1.2 PRE_BUILD, 1.1, 1.2 PRE_REMOVE, 1.3, 1.4

Moritz Heiber moe at lunar-linux.org
Wed Feb 16 02:20:01 UTC 2005


Update of /var/cvs/lunar/moonbase/doc-tools/docbook-xml
In directory espresso.foo-projects.org:/tmp/cvs-serv13315/docbook-xml

Modified Files:
	BUILD DEPENDS DETAILS POST_INSTALL POST_REMOVE PRE_BUILD 
	PRE_REMOVE 
Log Message:
Well, what can I say. I've been working on this for 10 hours straight
(Yes, ten hours). I just couldn't stand how broken docbook* was.

Everything is now updatable independently, there is nothing left behind
in any global configuration file. I also updated a couple of those modules
as they really deserved it.

Scheme change:

docbook-3.1 replaces any docbook-3.x module
docbook-sgml replaces any docbook-4.x module

iso832943-whatever was deprecated.
The /etc/xml/catalog rebuild is now done by a dynamic file fetched from
docbook.org (yeah, I know Nick, you modified it to fit in with Lunar ..
unfortunately you didn't catch up).

sgml-common has been sanitized.

Tested with gcc 3.3.3, 2.6.x and scrollkeeper, docbook-utils, glade2, gtk-doc
and a hell lot of others I probably forgot. Enjoy.

Oh and .. bow before your god.
(j/k)

PS: Thanks to the folks at BLFS .. without them I would have been clueless
(occasionally)


Index: BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/doc-tools/docbook-xml/BUILD,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- BUILD	1 Aug 2003 13:31:23 -0000	1.2
+++ BUILD	16 Feb 2005 02:19:58 -0000	1.3
@@ -1,19 +1,21 @@
 (
-  #clean-up broken previous install if it exists
-  if [ -d /usr/share/xml ]; then
-     rm -Rf /usr/share/xml
-  fi                                            &&
-
   TARGET=/usr/share/sgml/docbook/$MODULE-$VERSION
- 
-  cd $SOURCE_DIRECTORY                          &&
-  prepare_install                               &&
+  
+  # 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 &&
+
+  prepare_install &&
   if ! [ -d "$TARGET" ]; then
        mkdir -p $TARGET
-  fi                                            &&
- 
-  cp -a * $TARGET                               &&
+  fi &&
+  
+  rm -rf $SOURCE_DIRECTORY/old.libraries &&
 
-  ln -sf $TARGET/docbook.cat $TARGET/catalog 
+  cp -a $SOURCE_DIRECTORY/* $TARGET/ &&
+  install -m755 $SOURCE_CACHE/$SOURCE2 /usr/bin/ &&
+
+  ln -sf $TARGET/docbook.cat $TARGET/catalog  
   
 ) > $C_FIFO 2>&1

Index: DEPENDS
===================================================================
RCS file: /var/cvs/lunar/moonbase/doc-tools/docbook-xml/DEPENDS,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- DEPENDS	1 Aug 2003 13:31:23 -0000	1.2
+++ DEPENDS	16 Feb 2005 02:19:58 -0000	1.3
@@ -1,2 +1,3 @@
 depends openjade &&
-depends libxslt
+depends docbook-xsl &&
+depends docbook-sgml

Index: DETAILS
===================================================================
RCS file: /var/cvs/lunar/moonbase/doc-tools/docbook-xml/DETAILS,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- DETAILS	5 Oct 2004 09:29:55 -0000	1.5
+++ DETAILS	16 Feb 2005 02:19:58 -0000	1.6
@@ -1,10 +1,13 @@
           MODULE=docbook-xml
          VERSION=4.3
           SOURCE=$MODULE-$VERSION.zip
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/tmp
+	 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
+     SOURCE2_VFY=sha1:9890a7505713a5c78b038f7e5a2b9e06d6f96f1d
         WEB_SITE=http://www.docbook.org/xml/
          ENTERED=20030103
          UPDATED=20040919

Index: POST_INSTALL
===================================================================
RCS file: /var/cvs/lunar/moonbase/doc-tools/docbook-xml/POST_INSTALL,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- POST_INSTALL	1 Aug 2003 13:31:23 -0000	1.4
+++ POST_INSTALL	16 Feb 2005 02:19:58 -0000	1.5
@@ -1,6 +1,51 @@
-catalog=/usr/share/sgml/docbook/$MODULE-$VERSION/catalog
+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`
 
-if [ ! -d /etc/xml ]; then
-  mkdir /etc/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
 fi
-install-catalog --add /etc/sgml/catalog $catalog 
+
+install-catalog --remove $CENTRALIZED $CATALOGDIR/catalog
+
+install-catalog --add $CENTRALIZED $CATALOGDIR/catalog
+install-catalog --remove $CENTRALIZED /etc/sgml/catalog
+
+echo "Adding xml catalogs for $MODULE-$VERSION to $XML_PREFIX/catalog"
+/usr/bin/$SOURCE2 --prefix=$XML_PREFIX --version=$DOCBOOK_XML_VER
+
+(
+
+xmlcatalog --noout --add "public" \
+    "-//OASIS//DTD DocBook XML V4.1.2//EN" \
+    "http://www.oasis-open.org/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 &&
+xmlcatalog --noout --add "delegateURI" \
+    "http://www.oasis-open.org/docbook/xml/4.1.2/" \
+    "file:///etc/xml/docbook" /etc/xml/catalog &&
+xmlcatalog --noout --add "rewriteSystem" \
+    "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.1.2" \
+    "file://$CATALOGDIR" \
+    /etc/xml/docbook &&
+xmlcatalog --noout --add "rewriteURI" \
+    "http://www.oasis-open.org/docbook/xml/4.2" \
+    "file://$CATALOGDIR" \
+    /etc/xml/docbook
+)
+
+if module_installed scrollkeeper; then lin -c scrollkeeper; fi
+
+unset_module_config OLD_VER

Index: POST_REMOVE
===================================================================
RCS file: /var/cvs/lunar/moonbase/doc-tools/docbook-xml/POST_REMOVE,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- POST_REMOVE	1 Aug 2003 13:31:23 -0000	1.1
+++ POST_REMOVE	16 Feb 2005 02:19:58 -0000	1.2
@@ -1,3 +1,3 @@
 #this takes care of the old install directory
 
-rm -fr /usr/share/$MODULE
+rm -rf /usr/share/sgml/docbook/$MODULE-$VERSION

Index: PRE_BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/doc-tools/docbook-xml/PRE_BUILD,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- PRE_BUILD	3 Jan 2003 05:07:50 -0000	1.1
+++ PRE_BUILD	16 Feb 2005 02:19:58 -0000	1.2
@@ -1,3 +1,3 @@
-mkdir -p $SOURCE_DIRECTORY
+mk_source_dir $SOURCE_DIRECTOY &&
 unzip $SOURCE_CACHE/$SOURCE -d $SOURCE_DIRECTORY
   

Index: PRE_REMOVE
===================================================================
RCS file: /var/cvs/lunar/moonbase/doc-tools/docbook-xml/PRE_REMOVE,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- PRE_REMOVE	1 Aug 2003 13:31:23 -0000	1.3
+++ PRE_REMOVE	16 Feb 2005 02:19:58 -0000	1.4
@@ -1,7 +1,4 @@
-catalog=/usr/share/sgml/docbook/$MODULE-$VERSION/catalog 
-
-#Old way, this takes care of the old way of doing it.
-install-catalog -r /etc/sgml/catalog /usr/share/docbook-xml/docbook.cat
-install-catalog -r /etc/xml/catalog /usr/share/docbook-xml/docbook.cat
+CENTRALIZED=/etc/sgml/catalog 
+DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$MODULE-$VERSION
 
-install-catalog -r /etc/xml/catalog $catalog
+install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog



More information about the Lunar-commits mailing list