Estimated build time: 0.39 SBU Estimated required disk space: 15 MB |
Last checked against version 3.1.1.
Gawk is an awk implementation that is used to manipulate text files.
Gawk installs the following:
awk, gawk, gawk-3.1.1, grcat, igawk, pgawk, pgawk-3.1.1, pwcat
Before installing the Gawk package you have to apply a patch, which fixes the following issues:
Gawk's default location for libexecdir is $prefix/libexecdir/awk. This location doesn't comply with FHS (which never mentions a directory called libexecdir).
The patch allows us to pass --libexecdir to the configure script (without gawk tacking on /awk to the end), so that we can use a more appropriate location for gawk's libexecdir (/usr/bin in the book).
The default data directory for gawk is $prefix/share/awk. A package specific directory should be named using the package and version (like gawk-3.1.1 instead of awk) because there may be more than one awk interpreter on a system (and more than one version of gawk). The patch changes this to $prefix/share/gawk-3.1.1 to be more correct.
The patch ensures that this directory ($prefix/share/gawk-3.1.1) is removed along with its contents on a make uninstall.
patch -Np1 -i ../gawk-3.1.1-3.patch |
Prepare Gawk to be compiled:
./configure --prefix=/usr --libexecdir=/usr/bin |
Continue with compiling the package:
make |
Finish installing the package:
make install |