[Lunar-commits] CVS: moonbase/doc-tools/openjade BUILD, 1.4, 1.5 POST_INSTALL, 1.14, 1.15 PRE_REMOVE, 1.3, 1.4 catalog, 1.1, NONE

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


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

Modified Files:
	BUILD POST_INSTALL PRE_REMOVE 
Removed Files:
	catalog 
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/openjade/BUILD,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- BUILD	1 Aug 2003 13:22:35 -0000	1.4
+++ BUILD	16 Feb 2005 02:19:59 -0000	1.5
@@ -1,4 +1,9 @@
 (
+  # 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 &&
+
   CATALOGDIR="/usr/share/sgml/$MODULE-$VERSION"
   PTEXTD="$CATALOGDIR/pubtext"
 
@@ -31,6 +36,5 @@
   cp -r contrib   $CATALOGDIR                                &&
   cp -r unicode   $CATALOGDIR                                &&
   cp -r develdoc  $CATALOGDIR                                &&
-  ln -sf `which openjade` /usr/bin/jade                      &&
-  ln -sf `which onsgmls` /usr/bin/nsgmls 
+  ln -sf `which openjade` /usr/bin/jade
 ) > $C_FIFO 2>&1

Index: POST_INSTALL
===================================================================
RCS file: /var/cvs/lunar/moonbase/doc-tools/openjade/POST_INSTALL,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- POST_INSTALL	14 Feb 2005 12:46:39 -0000	1.14
+++ POST_INSTALL	16 Feb 2005 02:19:59 -0000	1.15
@@ -1,22 +1,34 @@
-cd $SOURCE_DIRECTORY
+OLD_VER=`get_module_config OLD_VER`
 CATALOGDIR="/usr/share/sgml/$MODULE-$VERSION"
-centralized="/etc/sgml/catalog"
+CATALOGDIR_OLD="/usr/share/sgml/$MODULE-$OLD_VER"
+CENTRALIZED="/etc/sgml/catalog"
 
-if ! [ -e "$centralized" ]; then
-     echo "Creating $centralized!" 
+if ! [ -e "$CENTRALIZED" ]; then
+     echo "Creating $CENTRALIZED" 
      mkdir -p /etc/sgml
-     touch $centralized
+     touch $CENTRALIZED
 fi  &&
 
-cp $SCRIPT_DIRECTORY/catalog /usr/share/sgml/$MODULE-$VERSION/contrib/ &&
+# Now we are handling the update
+if [ ! -z $OLD_VER ]; then
+  /usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR_OLD/catalog
+  /usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR_OLD/pubtext/catalog
+  /usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR_OLD/contrib/catalog
+  /usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR_OLD/unicode/catalog
+fi
 
-/usr/bin/install-catalog --add $centralized $CATALOGDIR/catalog  &&
-/usr/bin/install-catalog --add $centralized $CATALOGDIR/pubtext/catalog  &&
-/usr/bin/install-catalog --add $centralized $CATALOGDIR/contrib/catalog  &&
-/usr/bin/install-catalog --add $centralized $CATALOGDIR/unicode/catalog  &&
-/usr/bin/install-catalog -r $centralized /etc/sgml/catalog  &&
+/usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR/catalog
+/usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR/pubtext/catalog
+/usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR/contrib/catalog
+/usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR/unicode/catalog
 
-if ! grep -q "/usr/share/sgml/$MODULE-$VERSION" $centralized; then
-   /usr/bin/install-catalog -r $centralized /usr/share/sgml/$MODULE-$VERSION
+/usr/bin/install-catalog --add $CENTRALIZED $CATALOGDIR/catalog
+/usr/bin/install-catalog --add $CENTRALIZED $CATALOGDIR/pubtext/catalog
+/usr/bin/install-catalog --add $CENTRALIZED $CATALOGDIR/unicode/catalog
+/usr/bin/install-catalog --remove $CENTRALIZED $CENTRALIZED
+
+if ! grep -q "/usr/share/sgml/$MODULE-$VERSION" $CENTRALIZED; then
+   /usr/bin/install-catalog -r $CENTRALIZED $CATALOGDIR
 fi
 
+unset_module_config OLD_VER

Index: PRE_REMOVE
===================================================================
RCS file: /var/cvs/lunar/moonbase/doc-tools/openjade/PRE_REMOVE,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- PRE_REMOVE	1 Aug 2003 13:22:35 -0000	1.3
+++ PRE_REMOVE	16 Feb 2005 02:19:59 -0000	1.4
@@ -1,8 +1,6 @@
 CATALOGDIR="/usr/share/sgml/$MODULE-$VERSION"
-centralized="/etc/sgml/catalog"
+CENTRALIZED="/etc/sgml/catalog"
 
-/usr/bin/install-catalog --remove $centralized $CATALOGDIR/catalog
-/usr/bin/install-catalog --remove $centralized $CATALOGDIR/pubtext/catalog
-/usr/bin/install-catalog --remove $centralized $CATALOGDIR/contrib/catalog
-/usr/bin/install-catalog --remove $centralized $CATALOGDIR/unicode/catalog
-/usr/bin/install-catalog --remove $centralized $CATALOGDIR/dsssl/catalog
+/usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR/pubtext/catalog
+/usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR/contrib/catalog
+/usr/bin/install-catalog --remove $CENTRALIZED $CATALOGDIR/unicode/catalog

--- catalog DELETED ---



More information about the Lunar-commits mailing list