source: scripts/untested/blfs-scripts/blfs-docbook-sgml.sh@ 66f17d5

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 66f17d5 was 834dec0, checked in by Jim Gifford <clfs@…>, 19 years ago

r598@server (orig r596): ryan | 2005-08-05 23:14:53 -0700
Fix so we can install v4.2 ( 4.3/4.4 dont support 4.2, 4.1 and 4.0 )


  • Property mode set to 100755
File size: 1.9 KB
Line 
1#!/bin/bash
2
3### docbook-sgml ###
4
5# TODO: need to install 4.4 (supporting 4.3) 4.2 (supporting 4.1 and 4.0)
6# and 3.1 (supporting 3.0)
7
8cd ${SRC}
9LOG=docbook-sgml-${DBK_SGML_VER}-blfs.log
10
11PKGDIR="docbook-${DBK_SGML_VER}"
12if [ -d ${PKGDIR} ]; then rm -rf ${PKGDIR}; fi
13mkdir ${PKGDIR}
14cd ${PKGDIR}
15
16case ${DBK_SGML_VER} in
17 3.1 )
18 unzip ${TARBALLS}/docbk31.zip || barf
19 sed -i -e '/ISO 8879/d' \
20 -e "s|DTDDECL \"-//OASIS//DTD DocBook V${DBK_SGML_VER}//EN\"|SGMLDECL|g" \
21 docbook.cat
22 ;;
23 4.* )
24 unzip ${TARBALLS}/docbook-${DBK_SGML_VER}.zip || barf
25 sed -i -e '/ISO 8879/d' \
26 -e '/gml/d' docbook.cat
27 ;;
28esac
29
30install -d /usr/share/sgml/docbook/sgml-dtd-${DBK_SGML_VER} &&
31chown -R root:root . &&
32install docbook.cat \
33 /usr/share/sgml/docbook/sgml-dtd-${DBK_SGML_VER}/catalog &&
34cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-${DBK_SGML_VER} &&
35
36install-catalog --add /etc/sgml/sgml-docbook-dtd-${DBK_SGML_VER}.cat \
37 /usr/share/sgml/docbook/sgml-dtd-${DBK_SGML_VER}/catalog &&
38install-catalog --add /etc/sgml/sgml-docbook-dtd-${DBK_SGML_VER}.cat \
39 /etc/sgml/sgml-docbook.cat
40
41VERS="4.4 4.3 4.2 4.1 4.0"
42VERS=`echo ${VERS} | sed "s@${DBK_SGML_VER}.*@@g"`
43
44catalog=/usr/share/sgml/docbook/sgml-dtd-${DBK_SGML_VER}/catalog
45
46case ${DBK_SGML_VER} in
47 3.1 )
48 #
49 cat >> ${catalog} << "EOF"
50 -- Begin Single Major Version catalog changes --
51
52PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd"
53
54 -- End Single Major Version catalog changes --
55EOF
56 ;;
57 4.* )
58
59 echo " -- Begin Single Major Version catalog changes --" >> ${catalog}
60 echo "" >> ${catalog}
61 for ver in ${VERS} ; do
62 echo "PUBLIC \"-//OASIS//DTD DocBook V${ver}//EN\" \"docbook.dtd\"" \
63 >> ${catalog}
64 done
65 echo "" >> ${catalog}
66 echo " -- End Single Major Version catalog changes --" >> ${catalog}
67 ;;
68esac
Note: See TracBrowser for help on using the repository browser.