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 |
|
---|
8 | cd ${SRC}
|
---|
9 | LOG=docbook-sgml-${DBK_SGML_VER}-blfs.log
|
---|
10 |
|
---|
11 | PKGDIR="docbook-${DBK_SGML_VER}"
|
---|
12 | if [ -d ${PKGDIR} ]; then rm -rf ${PKGDIR}; fi
|
---|
13 | mkdir ${PKGDIR}
|
---|
14 | cd ${PKGDIR}
|
---|
15 |
|
---|
16 | case ${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 | ;;
|
---|
28 | esac
|
---|
29 |
|
---|
30 | install -d /usr/share/sgml/docbook/sgml-dtd-${DBK_SGML_VER} &&
|
---|
31 | chown -R root:root . &&
|
---|
32 | install docbook.cat \
|
---|
33 | /usr/share/sgml/docbook/sgml-dtd-${DBK_SGML_VER}/catalog &&
|
---|
34 | cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-${DBK_SGML_VER} &&
|
---|
35 |
|
---|
36 | install-catalog --add /etc/sgml/sgml-docbook-dtd-${DBK_SGML_VER}.cat \
|
---|
37 | /usr/share/sgml/docbook/sgml-dtd-${DBK_SGML_VER}/catalog &&
|
---|
38 | install-catalog --add /etc/sgml/sgml-docbook-dtd-${DBK_SGML_VER}.cat \
|
---|
39 | /etc/sgml/sgml-docbook.cat
|
---|
40 |
|
---|
41 | VERS="4.4 4.3 4.2 4.1 4.0"
|
---|
42 | VERS=`echo ${VERS} | sed "s@${DBK_SGML_VER}.*@@g"`
|
---|
43 |
|
---|
44 | catalog=/usr/share/sgml/docbook/sgml-dtd-${DBK_SGML_VER}/catalog
|
---|
45 |
|
---|
46 | case ${DBK_SGML_VER} in
|
---|
47 | 3.1 )
|
---|
48 | #
|
---|
49 | cat >> ${catalog} << "EOF"
|
---|
50 | -- Begin Single Major Version catalog changes --
|
---|
51 |
|
---|
52 | PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd"
|
---|
53 |
|
---|
54 | -- End Single Major Version catalog changes --
|
---|
55 | EOF
|
---|
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 | ;;
|
---|
68 | esac
|
---|