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