1 | #!/bin/bash
|
---|
2 |
|
---|
3 | ### docbook-xsl ###
|
---|
4 |
|
---|
5 | cd ${SRC}
|
---|
6 | LOG=docbook-xsl-blfs.log
|
---|
7 |
|
---|
8 | unpack_tarball docbook-xsl-${DBK_XSL_VER}
|
---|
9 | cd ${PKGDIR}
|
---|
10 |
|
---|
11 | install -d /usr/share/xml/docbook/xsl-stylesheets-${DBK_XSL_VER} &&
|
---|
12 | chown -R root:root . &&
|
---|
13 |
|
---|
14 | cp -af INSTALL VERSION common eclipse extensions fo html htmlhelp \
|
---|
15 | images javahelp lib manpages params profiling template xhtml \
|
---|
16 | /usr/share/xml/docbook/xsl-stylesheets-${DBK_XSL_VER} &&
|
---|
17 | install -d /usr/share/doc/xml &&
|
---|
18 | cp -af doc/* /usr/share/doc/xml &&
|
---|
19 |
|
---|
20 | cd /usr/share/xml/docbook/xsl-stylesheets-${DBK_XSL_VER} &&
|
---|
21 | sh INSTALL &&
|
---|
22 |
|
---|
23 | if [ ! -f /etc/xml/catalog ]; then mkdir -p /etc/xml; xmlcatalog \
|
---|
24 | --noout --create /etc/xml/catalog; fi &&
|
---|
25 | if [ ! -e /etc/xml/docbook ]; then xmlcatalog --noout --create \
|
---|
26 | /etc/xml/docbook; fi &&
|
---|
27 |
|
---|
28 | xmlcatalog --noout --add "rewriteSystem" \
|
---|
29 | "http://docbook.sourceforge.net/release/xsl/${DBK_XSL_VER}" \
|
---|
30 | "/usr/share/xml/docbook/xsl-stylesheets-${DBK_XSL_VER}" /etc/xml/catalog &&
|
---|
31 | xmlcatalog --noout --add "rewriteURI" \
|
---|
32 | "http://docbook.sourceforge.net/release/xsl/${DBK_XSL_VER}" \
|
---|
33 | "/usr/share/xml/docbook/xsl-stylesheets-${DBK_XSL_VER}" /etc/xml/catalog &&
|
---|
34 | xmlcatalog --noout --add "delegateSystem" \
|
---|
35 | "http://docbook.sourceforge.net/release/xsl/" \
|
---|
36 | "file:///etc/xml/docbook" /etc/xml/catalog &&
|
---|
37 | xmlcatalog --noout --add "delegateURI" \
|
---|
38 | "http://docbook.sourceforge.net/release/xsl/" \
|
---|
39 | "file:///etc/xml/docbook" /etc/xml/catalog
|
---|
40 |
|
---|
41 | # Setup shell env for xsl
|
---|
42 | if [ ! -d /etc/profile.d ]; then mkdir /etc/profile.d ; fi
|
---|
43 | cat > /etc/profile.d/xsl.sh << EOF
|
---|
44 | # Set up Environment Variable for XSL Processing
|
---|
45 | export XML_CATALOG_FILES="/usr/share/xml/docbook/\
|
---|
46 | xsl-stylesheets-${DBK_XSL_VER}/catalog.xml /etc/xml/catalog"
|
---|
47 | EOF
|
---|
48 |
|
---|
49 | # Configure
|
---|
50 | # TODO: need to sanely add more versions in here
|
---|
51 | VERS="1.61.3 1.65.1 1.66.1 1.67.0 1.67.2"
|
---|
52 | VERS=`echo ${VERS} | sed "s@${DBK_XSL_VER}.*@@g"`
|
---|
53 | # When building gtk-doc, it searches for release/xsl/current...
|
---|
54 | # add this first...
|
---|
55 | VERS="current ${VERS}"
|
---|
56 |
|
---|
57 | for ver in ${VERS} ; do
|
---|
58 | xmlcatalog --noout --add "rewriteSystem" \
|
---|
59 | "http://docbook.sourceforge.net/release/xsl/${ver}" \
|
---|
60 | "/usr/share/xml/docbook/xsl-stylesheets-${DBK_XSL_VER}" \
|
---|
61 | /etc/xml/catalog &&
|
---|
62 | xmlcatalog --noout --add "rewriteURI" \
|
---|
63 | "http://docbook.sourceforge.net/release/xsl/${ver}" \
|
---|
64 | "/usr/share/xml/docbook/xsl-stylesheets-${DBK_XSL_VER}" \
|
---|
65 | /etc/xml/catalog
|
---|
66 | done
|
---|
67 |
|
---|