gawk.xml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <sect1 id="ch06-gawk">
  2. <title>Installing Gawk-&gawk-version;</title>
  3. <?dbhtml filename="gawk.html" dir="chapter06"?>
  4. <screen>Estimated build time: &gawk-time;
  5. Estimated required disk space: &gawk-compsize;</screen>
  6. &aa-gawk-shortdesc;
  7. &aa-gawk-dep;
  8. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  9. <sect2>
  10. <title>Installation of Gawk</title>
  11. <para>First apply a patch to fix the following issues:</para>
  12. <itemizedlist>
  13. <listitem><para>Gawk's default location for some of its executables is
  14. <filename>$prefix/libexec/awk</filename>. This location doesn't comply
  15. with the FHS, which never even mentions a directory called
  16. <filename>libexec</filename>. The patch makes it possible to pass a
  17. <emphasis>--libexecdir</emphasis> switch to the configure script, so that we
  18. can use a more appropriate location for the <userinput>grcat</userinput> and
  19. <userinput>pwcat</userinput> binaries:
  20. <filename>/usr/bin</filename>.</para></listitem>
  21. <listitem><para>Gawk's default data directory is
  22. <filename>$prefix/share/awk</filename>. But package-specific
  23. directories should be named using the package name and version number
  24. (for example: <filename>gawk-7.7.2.</filename>) and not simply the package
  25. name, as there may be different versions of a package installed on the system.
  26. The patch changes the name of the data directory to the correct
  27. <filename>$prefix/share/gawk-&gawk-version;</filename>.</para></listitem>
  28. <listitem><para>The patch also ensures that this data directory, including its
  29. contents, is removed on a <emphasis>make uninstall</emphasis>.</para></listitem>
  30. </itemizedlist>
  31. <screen><userinput>patch -Np1 -i ../&gawk-patch;</userinput></screen>
  32. <para>Now prepare Gawk for compilation:</para>
  33. <screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen>
  34. <para>Compile the package:</para>
  35. <screen><userinput>make</userinput></screen>
  36. <para>This package has a test suite available which can perform a number of
  37. checks to ensure it built correctly. Should you choose to run it, the
  38. following command will do so:</para>
  39. <screen><userinput>make check</userinput></screen>
  40. <para>And install the package:</para>
  41. <screen><userinput>make install</userinput></screen>
  42. </sect2>
  43. </sect1>