INSTALL 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. LFS Book Conversion Tools Installation Instructions
  2. After downloading the SVN source, there are some things that need to be set up
  3. on your computer if you want to convert the XML source into something easier to
  4. read (e.g. HTML, TXT, PS or PDF). If you are interested in this, then keep
  5. reading. If you are only interested in editing the XML source for re-
  6. submission to the lfs-book or lfs-dev mailing lists, then you do not need this
  7. document. Instead, you need to read the LFS Editor's Manual. See the LFS
  8. website at http://www.linuxfromscratch.org for more information.
  9. -------------------------------------------------------------------------------
  10. If all you want to do is convert XML to HTML perform the following:
  11. * libxml2
  12. - http://www.linuxfromscratch.org/blfs/view/svn/general/libxml2.html
  13. * libxslt
  14. - http://www.linuxfromscratch.org/blfs/view/svn/general/libxslt.html
  15. * DocBook DTD
  16. - http://www.linuxfromscratch.org/blfs/view/svn/pst/xml.html
  17. * DocBook XSL Stylesheets (1.67.2)
  18. install -d /usr/share/xml/docbook/xsl-stylesheets-1.67.2
  19. chown -R root:root .
  20. cp -af INSTALL VERSION common eclipse extensions fo html htmlhelp images \
  21. javahelp lib manpages params profiling template xhtml \
  22. /usr/share/xml/docbook/xsl-stylesheets-1.67.2
  23. install -d /usr/share/doc/xml
  24. cp -af doc/* /usr/share/doc/xml
  25. cd /usr/share/xml/docbook/xsl-stylesheets-1.67.2 && \
  26. sed -i -e 's@current/@1.67.2/@' INSTALL && \
  27. sh INSTALL
  28. xmlcatalog --noout --add "delegateURI" \
  29. "http://docbook.sourceforge.net/release/xsl/1.67.2/" \
  30. "file:///usr/share/xml/docbook/xsl-stylesheets-1.67.2/catalog.xml" \
  31. /etc/xml/catalog
  32. ln -sf xsl-stylesheets-$(VERSION) \
  33. /usr/share/xml/docbook/xsl-stylesheets-current
  34. * HTMLTidy
  35. - http://www.linuxfromscratch.org/blfs/view/svn/general/tidy.html
  36. - you'll also need the patch at http://linuxfromscratch.org/~matthew/tidy-041026-prevent_PRE_newlines-1.patch as well.
  37. -------------------------------------------------------------------------------
  38. If you want to be able to convert the book into PDF as well, then you will need
  39. the FOP package. This takes an XSL-FO file (created with libxslt which you
  40. already installed) and converts it to PDF. FOP is dependent on ANT
  41. (Another Neat Tool) and the Java Advanced Imaging (JAI) API.
  42. First we need the Java SDK installed. See
  43. http://www.linuxfromscratch.org/blfs/view/svn/general/j2sdk.html.
  44. Now install JAI:
  45. - Download jai-1_1_2_01-lib-linux-i586-jdk.bin from
  46. http://java.sun.com/products/java-media/jai/downloads/download-1_1_2_01.html
  47. (download the version for the JDK Install).
  48. - chmod +x jai-1_1_2_01-lib-linux-i586-jdk.bin
  49. - cd /opt/j2sdk && /path/to/jai-1_1_2_01-lib-linux-i586-jdk.bin
  50. Next install ANT:
  51. - http://www.linuxfromscratch.org/blfs/view/svn/general/apache-ant.html
  52. And finally install FOP:
  53. - download http://www.apache.org/dist/xml/fop/fop-0.20.5-src.tar.gz
  54. - tar -xzvf fop-0.20.5-src.tar.gz
  55. (recent versions of tar will warn about "A lone zero block at 33476" but
  56. this can be safely ignored)
  57. - cd fop-0.20.5 &&
  58. ./build.sh &&
  59. install -d /opt/fop/{bin,lib} &&
  60. cp lib/{avalon-framework-cvs-20020806.jar,batik.jar} build/fop.jar \
  61. /opt/fop/lib &&
  62. cp fop.sh /opt/fop/bin
  63. - edit your bash profile to set FOP_HOME=/opt/fop and PATH=$PATH:/opt/fop/bin