8.56. Automake-1.17

The Automake package contains programs for generating Makefiles for use with Autoconf.

Approximate build time: less than 0.1 SBU (about 1.1 SBU with tests)
Required disk space: 121 MB

8.56.1. Installation of Automake

Create the PKGBUILD for the Automake package with the following commands:

mkdir /sources/automake
cd /sources/automake
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>

pkgname="automake"
pkgver="1.17"
pkgrel="1"
pkgdesc="The Automake package contains programs for generating Makefiles for use with Autoconf."
arch=('x86'
      'x86_64')
url="https://www.gnu.org/software/automake/"
license=('GPLv2')
groups=('core')
depends=('bash'
         'coreutils'
         'grep'
         'm4'
         'sed'
         'texinfo'
         'rootfs')
makedepends=('autoconf'
             'gettext'
             'make'
             'perl')
checkdepends=('binutils'
              'bison'
              'bzip2'
              'dejagnu'
              'diffutils'
              'expect'
              'findutils'
              'flex'
              'gcc'
              'gettext'
              'gzip'
              'libtool'
              'tar')
source=('https://ftp.gnu.org/gnu/automake/automake-1.17.tar.xz')
md5sums=('7ab3a02318fee6f5bd42adfc369abf10')
    
build(){
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --docdir=/usr/share/doc/automake-${pkgver}
  make
}

check(){
  cd ${pkgname}-${pkgver}
  # Use -j4 at a minimum due to long waits
  make -j$(($(nproc)>4?$(nproc):4)) check
}

package(){
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
}
REALEOF

Prepare the build directory for the pacman user and build the package:

chown -R root:pacman .
chmod 2775 .
chmod 664 PKGBUILD
su pacman -c 'makepkg -L --nodeps'

Add the newly created package to the central package repository:

cp automake-1.17-1-$(uname -m).pkg.tar.xz \
   /srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
         /srv/pacman/repos/LFS/automake-1.17-1-$(uname -m).pkg.tar.xz

Update the local cache and install the Automake package:

pacman -Syu
pacman -S automake --overwrite \* -dd --noconfirm

Finally, copy the source files into the source repository and clean up the build directory:

mkdir /srv/pacman/source/LFS/automake
cp PKGBUILD /srv/pacman/source/LFS/automake
cd /sources
rm -rf automake

8.56.2. Contents of Automake

Installed programs: aclocal, aclocal-1.17 (hard linked with aclocal), automake, and automake-1.17 (hard linked with automake)
Installed directories: /usr/share/aclocal-1.17, /usr/share/automake-1.17, and /usr/share/doc/automake-1.17

Short Descriptions

aclocal

Generates aclocal.m4 files based on the contents of configure.in files

aclocal-1.17

A hard link to aclocal

automake

A tool for automatically generating Makefile.in files from Makefile.am files [To create all the Makefile.in files for a package, run this program in the top-level directory. By scanning the configure.in file, it automatically finds each appropriate Makefile.am file and generates the corresponding Makefile.in file.]

automake-1.17

A hard link to automake