[Lunar-commits] <moonbase> docbook-xml=4.4: Adding to moonbase. Will be a depends for kdelibs-4.5.
Dennis `stumbles` Veatch
stumbles at lunar-linux.org
Sat Aug 21 15:01:52 CEST 2010
commit 37c78c1df611cbbaf57cabac10beb41ca29c004b
Author: Dennis `stumbles` Veatch <stumbles at lunar-linux.org>
Date: Sat Aug 21 09:01:52 2010 -0400
docbook-xml=4.4: Adding to moonbase. Will be a depends for kdelibs-4.5.
---
doc-tools/docbook-xml-4.2/BUILD | 22 ++++++++++++++
doc-tools/docbook-xml-4.2/DEPENDS | 4 ++
doc-tools/docbook-xml-4.2/DETAILS | 21 +++++++++++++
doc-tools/docbook-xml-4.2/POST_INSTALL | 51 ++++++++++++++++++++++++++++++++
doc-tools/docbook-xml-4.2/POST_REMOVE | 3 ++
doc-tools/docbook-xml-4.2/PRE_BUILD | 3 ++
doc-tools/docbook-xml-4.2/PRE_REMOVE | 4 ++
7 files changed, 108 insertions(+), 0 deletions(-)
diff --git a/doc-tools/docbook-xml-4.2/BUILD b/doc-tools/docbook-xml-4.2/BUILD
new file mode 100644
index 0000000..2556203
--- /dev/null
+++ b/doc-tools/docbook-xml-4.2/BUILD
@@ -0,0 +1,22 @@
+(
+
+ TARGET=/usr/share/sgml/docbook/$MODULE &&
+
+ # 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 &&
+
+ rm -rf $SOURCE_DIRECTORY/old.libraries &&
+
+ cp -a $SOURCE_DIRECTORY/* $TARGET/ &&
+ install -m755 $SOURCE_CACHE/$SOURCE2 /usr/bin/ &&
+
+ ln -sf $TARGET/docbook.cat $TARGET/catalog
+
+) > $C_FIFO 2>&1
diff --git a/doc-tools/docbook-xml-4.2/DEPENDS b/doc-tools/docbook-xml-4.2/DEPENDS
new file mode 100644
index 0000000..45cc338
--- /dev/null
+++ b/doc-tools/docbook-xml-4.2/DEPENDS
@@ -0,0 +1,4 @@
+depends openjade
+depends docbook-xsl
+depends docbook-sgml
+depends unzip
diff --git a/doc-tools/docbook-xml-4.2/DETAILS b/doc-tools/docbook-xml-4.2/DETAILS
new file mode 100644
index 0000000..c122808
--- /dev/null
+++ b/doc-tools/docbook-xml-4.2/DETAILS
@@ -0,0 +1,21 @@
+ MODULE=docbook-xml-4.2
+ VERSION=4.2
+ SOURCE=docbook-xml-$VERSION.zip
+ SOURCE2=buildDocBookCatalog
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/tmp-$MODULE
+ SOURCE_URL[0]=http://www.oasis-open.org/docbook/xml/4.2/
+ SOURCE_VFY=sha1:5e3a35663cd028c5c5fbb959c3858fec2d7f8b9e
+ WEB_SITE=http://www.oasis-open.org/docbook/xml/4.2/
+ ENTERED=20100821
+ UPDATED=20100821
+ SHORT="The DocBook XML DTD"
+
+cat << EOF
+DocBook is an XML/SGML vocabulary particularly well suited to books
+and papers about computer hardware and software (though it is by no
+means limited to these applications).
+The DocBook Technical Committee maintains the DocBook schema.
+DocBook is officially available as a Document Type Definition (DTD)
+for both XML and SGML. It is unofficially available in other forms
+as well.
+EOF
diff --git a/doc-tools/docbook-xml-4.2/POST_INSTALL b/doc-tools/docbook-xml-4.2/POST_INSTALL
new file mode 100644
index 0000000..a77c51f
--- /dev/null
+++ b/doc-tools/docbook-xml-4.2/POST_INSTALL
@@ -0,0 +1,51 @@
+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
+fi
+
+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
diff --git a/doc-tools/docbook-xml-4.2/POST_REMOVE b/doc-tools/docbook-xml-4.2/POST_REMOVE
new file mode 100644
index 0000000..06339b0
--- /dev/null
+++ b/doc-tools/docbook-xml-4.2/POST_REMOVE
@@ -0,0 +1,3 @@
+#this takes care of the old install directory
+
+rm -rf /usr/share/sgml/docbook/$MODULE-$VERSION
diff --git a/doc-tools/docbook-xml-4.2/PRE_BUILD b/doc-tools/docbook-xml-4.2/PRE_BUILD
new file mode 100644
index 0000000..8b474ad
--- /dev/null
+++ b/doc-tools/docbook-xml-4.2/PRE_BUILD
@@ -0,0 +1,3 @@
+mk_source_dir $SOURCE_DIRECTOY &&
+unzip $SOURCE_CACHE/$SOURCE -d $SOURCE_DIRECTORY
+
diff --git a/doc-tools/docbook-xml-4.2/PRE_REMOVE b/doc-tools/docbook-xml-4.2/PRE_REMOVE
new file mode 100644
index 0000000..65eaffe
--- /dev/null
+++ b/doc-tools/docbook-xml-4.2/PRE_REMOVE
@@ -0,0 +1,4 @@
+CENTRALIZED=/etc/sgml/catalog
+DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$MODULE-$VERSION
+
+install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog
More information about the Lunar-commits
mailing list