The Make package contains a program for controlling the generation of executables and other non-source files of a package from source files.
Create the PKGBUILD for the Make package with the following commands:
mkdir /sources/make
cd /sources/make
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="make"
pkgver="4.4.1"
pkgrel="1"
pkgdesc="The Make package contains a program for controlling the generation of executables and other non-source files of a package from source files."
arch=('x86'
'x86_64')
url="https://www.gnu.org/software/make/"
license=('GPLv3')
groups=('core')
depends=('glibc'
'rootfs')
makedepends=('bash'
'binutils'
'coreutils'
'gcc'
'gettext'
'grep'
'make'
'sed'
'texinfo')
checkdepends=('perl'
'procps-ng')
optdepends=('guile')
source=('https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz')
md5sums=('c8469a3713cbbe04d955d4ae4be23eeb')
build(){
cd "${pkgname}-${pkgver}"
./configure --prefix=/usr
make
}
check(){
cd "${pkgname}-${pkgver}"
make 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 make-4.4.1-1-$(uname -m).pkg.tar.xz \
/srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
/srv/pacman/repos/LFS/make-4.4.1-1-$(uname -m).pkg.tar.xz
Update the local cache and install the Make package:
pacman -Syu pacman -S make --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean up the build directory:
mkdir /srv/pacman/source/LFS/make cp PKGBUILD /srv/pacman/source/LFS/make cd /sources rm -rf make