source: scripts/untested/blfs-scripts/blfs-docbook-xml.sh@ def3913

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since def3913 was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 4.5 KB
Line 
1#!/bin/bash
2
3### docbook-xml ###
4
5cd ${SRC}
6LOG=docbook-xml-${DBK_XML_DTD_VER}-blfs.log
7
8PKGDIR="docbook-xml-${DBK_XML_DTD_VER}"
9if [ -d ${PKGDIR} ]; then rm -rf ${PKGDIR}; fi
10mkdir ${PKGDIR}
11cd ${PKGDIR}
12
13unzip ${TARBALLS}/docbook-xml-${DBK_XML_DTD_VER}.zip || barf
14
15
16install -d /usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER} &&
17chown -R root:root . &&
18cp -af docbook.cat *.dtd ent/ *.mod \
19 /usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER} &&
20if [ ! -e /etc/xml/catalog ]; then mkdir -p /etc/xml; xmlcatalog \
21 --noout --create /etc/xml/catalog; fi &&
22if [ ! -e /etc/xml/docbook ]; then xmlcatalog --noout --create \
23 /etc/xml/docbook; fi &&
24xmlcatalog --noout --add "public" \
25 "-//OASIS//ELEMENTS DocBook XML Information Pool V${DBK_XML_DTD_VER}//EN" \
26 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}/dbpoolx.mod" \
27 /etc/xml/docbook &&
28xmlcatalog --noout --add "public" \
29 "-//OASIS//DTD DocBook XML V${DBK_XML_DTD_VER}//EN" \
30 "http://www.oasis-open.org/docbook/xml/${DBK_XML_DTD_VER}/docbookx.dtd" \
31 /etc/xml/docbook &&
32xmlcatalog --noout --add "public" \
33 "-//OASIS//ENTITIES DocBook XML Character Entities V${DBK_XML_DTD_VER}//EN" \
34 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}/dbcentx.mod" \
35 /etc/xml/docbook &&
36xmlcatalog --noout --add "public" \
37 "-//OASIS//ENTITIES DocBook XML Notations V${DBK_XML_DTD_VER}//EN" \
38 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}/dbnotnx.mod" \
39 /etc/xml/docbook &&
40xmlcatalog --noout --add "public" \
41 "-//OASIS//ENTITIES DocBook XML Additional General Entities V${DBK_XML_DTD_VER}//EN" \
42 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}/dbgenent.mod" \
43 /etc/xml/docbook &&
44xmlcatalog --noout --add "public" \
45 "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V${DBK_XML_DTD_VER}//EN" \
46 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}/dbhierx.mod" \
47 /etc/xml/docbook &&
48xmlcatalog --noout --add "public" \
49 "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
50 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}/soextblx.dtd" \
51 /etc/xml/docbook &&
52xmlcatalog --noout --add "public" \
53 "-//OASIS//DTD DocBook XML CALS Table Model V${DBK_XML_DTD_VER}//EN" \
54 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}/calstblx.dtd" \
55 /etc/xml/docbook &&
56xmlcatalog --noout --add "rewriteSystem" \
57 "http://www.oasis-open.org/docbook/xml/${DBK_XML_DTD_VER}" \
58 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}" \
59 /etc/xml/docbook &&
60xmlcatalog --noout --add "rewriteURI" \
61 "http://www.oasis-open.org/docbook/xml/${DBK_XML_DTD_VER}" \
62 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}" \
63 /etc/xml/docbook &&
64xmlcatalog --noout --add "delegatePublic" \
65 "-//OASIS//ENTITIES DocBook XML" \
66 "file:///etc/xml/docbook" /etc/xml/catalog &&
67xmlcatalog --noout --add "delegatePublic" \
68 "-//OASIS//DTD DocBook XML" \
69 "file:///etc/xml/docbook" /etc/xml/catalog &&
70xmlcatalog --noout --add "delegateSystem" \
71 "http://www.oasis-open.org/docbook/" \
72 "file:///etc/xml/docbook" /etc/xml/catalog &&
73xmlcatalog --noout --add "delegateURI" \
74 "http://www.oasis-open.org/docbook/" \
75 "file:///etc/xml/docbook" /etc/xml/catalog
76
77
78# Configure
79# TODO: need to sanely add more versions in here
80VERS="4.1.2 4.2 4.3 4.4"
81VERS=`echo ${VERS} | sed "s@${DBK_XML_DTD_VER}.*@@g"`
82
83for ver in ${VERS} ; do
84 case ${ver} in
85 4.1.2 )
86 xmlcatalog --noout --add "public" \
87 "-//OASIS//DTD DocBook XML V${ver}//EN" \
88 "http://www.oasis-open.org/docbook/xml/${ver}/docbookx.dtd" \
89 /etc/xml/docbook &&
90 xmlcatalog --noout --add "delegateSystem" \
91 "http://www.oasis-open.org/docbook/xml/${ver}/" \
92 "file:///etc/xml/docbook" /etc/xml/catalog &&
93 xmlcatalog --noout --add "delegateURI" \
94 "http://www.oasis-open.org/docbook/xml/${ver}/" \
95 "file:///etc/xml/docbook" /etc/xml/catalog &&
96 xmlcatalog --noout --add "rewriteSystem" \
97 "http://www.oasis-open.org/docbook/xml/${ver}" \
98 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}" \
99 /etc/xml/docbook &&
100 xmlcatalog --noout --add "rewriteURI" \
101 "http://www.oasis-open.org/docbook/xml/${ver}" \
102 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}" \
103 /etc/xml/docbook
104 ;;
105 * )
106 xmlcatalog --noout --add "rewriteURI" \
107 "http://www.oasis-open.org/docbook/xml/${ver}" \
108 "file:///usr/share/xml/docbook/xml-dtd-${DBK_XML_DTD_VER}" \
109 /etc/xml/docbook
110 ;;
111 esac
112done
Note: See TracBrowser for help on using the repository browser.