gawk-inst.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2>
  3. <title>Installation of Gawk</title>
  4. <para>Before installing the Gawk package you have to apply a patch,
  5. which fixes the following issues:</para>
  6. <itemizedlist>
  7. <listitem><para>Gawk's default location for libexecdir is <filename
  8. class="directory">$prefix/libexecdir/awk</filename>. This location doesn't
  9. comply with FHS (which never mentions a directory called
  10. libexecdir).</para></listitem>
  11. <listitem><para>The patch allows us to pass
  12. <emphasis>--libexecdir</emphasis> to the configure script (without gawk
  13. tacking on /awk to the end), so that we can use a more appropriate location
  14. for gawk's libexecdir (<filename class="directory">/usr/bin</filename> in
  15. the book).</para></listitem>
  16. <listitem><para>The default data directory for gawk is <filename
  17. class="directory">$prefix/share/awk</filename>. A package specific
  18. directory should be named using the package and version (like gawk-3.1.3
  19. instead of awk) because there may be more than one awk interpreter on a
  20. system (and more than one version of gawk). The patch changes this to
  21. <filename class="directory">$prefix/share/gawk-3.1.3</filename> to be more
  22. correct.</para></listitem>
  23. <listitem><para>The patch ensures that this directory (<filename
  24. class="directory">$prefix/share/gawk-3.1.3</filename>) is removed along
  25. with its contents on a make uninstall.</para></listitem>
  26. </itemizedlist>
  27. <para><screen><userinput>patch -Np1 -i ../&gawk-patch;</userinput></screen></para>
  28. <para>Now prepare Gawk for compilation:</para>
  29. <para><screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen></para>
  30. <para>Compile the package:</para>
  31. <para><screen><userinput>make</userinput></screen></para>
  32. <para>This package has a test suite available which can perform a number of
  33. checks to ensure it built correctly. Should you choose to run it, the
  34. following command will do so:</para>
  35. <para><screen><userinput>make check</userinput></screen></para>
  36. <para>And install the package:</para>
  37. <para><screen><userinput>make install</userinput></screen></para>
  38. </sect2>