gawk-inst.xml 1.9 KB

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