INSTALL 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. Ok, so you have downloaded the XML source. Now what? You are probably
  2. wanting to convert these XML files to easier to read HTML, PS, PDF, txt
  3. or other formatted files. All that can be read below.
  4. Let's start by downloading some software.
  5. If all you want to do is being able to convert XML to HTML download the
  6. following:
  7. OpenJade - http://openjade.sourceforge.net
  8. DocBook-XML DTD - http://www.docbook.org/xml/4.1.2/
  9. DSSSL DocBook Stylesheets - http://www.nwalsh.com/docbook/dsssl/
  10. As the DocBook DTD and Stylesheets are made available as a zip achives you
  11. may need to download the unzip package as well if your Linux system doesn't
  12. have one:
  13. Unzip - ftp://ftp.info-zip.org/pub/infozip/src/
  14. If you want to be able to convert the book into PS and PDF as well I
  15. recommend using the Htmldoc program. This takes a html file (created
  16. with openjade which you already downloaded) and converts it to PS or
  17. PDF:
  18. HTMLDOC - http://www.easysw.com/htmldoc/
  19. FLTK (X front-end) - http://sourceforge.net/projects/fltk
  20. If you want to be able to convert the book into TXT as well I recommend
  21. using lynx to convert HTML to TXT using the -dump option to lynx. There
  22. are most likely better programs to do this, but Lynx is often installed
  23. on systems anyways (as a console based web browser).
  24. Lynx - http://lynx.browser.org
  25. You have everything you need now. Let's install this stuff.
  26. Create the /usr/share/docbook directory, cd into it and unpack the
  27. docbook-xml dtd archive there.
  28. Create the /usr/share/dsssl directory, cd into it and unpack the dsssl
  29. stylesheet archive in there. Now copy the lfs.dsl file you will find in
  30. the LFS-BOOK XML archive into /usr/share/dsssl/docbook/html
  31. The last step is installed OpenJade.
  32. In order for openjade to be able to convert the DocBook based documents
  33. into other formats, it needs to know where the DocBook DTD related
  34. files are located. This is sort of the DocBook equivalent for the $PATH
  35. variable. You have two ways of doing this:
  36. 1) You can set the $SGML_CATALOG_FILES variable and include the full
  37. paths to the catalog files in it
  38. or
  39. 2) You can hard-code the paths into the openjade binary.
  40. If you choose option 1, add the following to your bash configuration
  41. file, system wide profile or wherever you wish to include it:
  42. export SGML_CATALOG_FILES=/usr/share/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog
  43. Followed by installing openjade by running:
  44. ./configure --prefix=/usr
  45. make
  46. make install
  47. cp -av dsssl /usr/share/dsssl/openjade
  48. If you choose option 2, install OpenJade as follows:
  49. ./configure --prefix=/usr \
  50. > --enable-default-catalog=/usr/share/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog
  51. make
  52. make install
  53. cp -av dsssl /usr/share/dsssl/openjade
  54. And you don't have to worry about the $SGML_CATALOG_FILES variable in
  55. this case.
  56. You're all set to convert XML to HTML (among a few other formats
  57. supported by openjade) now. If you want to convert to PS and PDF as
  58. well, install the following two packages.
  59. FLTK (you can skip this one if you don't want the X front-end):
  60. ./configure --prefix=/usr
  61. make
  62. make install
  63. HTMLDOC:
  64. Edit the Makefile.in file and find these lines:
  65. install:
  66. $(MAKE) all
  67. for dir in $(INSTALLDIRS); do\
  68. echo Installing in $$dir...;\
  69. (cd $$dir; $(MAKE) -$(MAKEFLAGS) clean) || break;\
  70. done
  71. Change this into:
  72. install:
  73. $(MAKE) all
  74. for dir in $(INSTALLDIRS); do\
  75. echo Installing in $$dir...;\
  76. (cd $$dir; $(MAKE) -$(MAKEFLAGS) install) || break;\
  77. done
  78. This will fix that little bug that causes 'make install' to be
  79. identical to 'make clean'. Now continue with:
  80. ./configure --prefix=/usr
  81. make
  82. make install
  83. The last package is Lynx which will be used for the HTML to TXT
  84. conversion. Install it by running:
  85. ./configure --prefix=/usr
  86. make
  87. make install
  88. There, all set now. Go back to the README file for some examples how to
  89. convert this XML to the various other formats.