The Libtool package contains the GNU generic library support script. It makes the use of shared libraries simpler with a consistent, portable interface.
Create the PKGBUILD for the Libtool package with the following commands:
mkdir /sources/libtool
cd /sources/libtool
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="libtool"
pkgver="2.5.4"
pkgrel="1"
pkgdesc="The Libtool package contains the GNU generic library support script."
arch=('x86'
'x86_64')
url="https://www.gnu.org/software/libtool/"
license=('GPLv2')
groups=('core')
depends=('autoconf'
'automake'
'bash'
'binutils'
'coreutils'
'file'
'gcc'
'glibc'
'grep'
'make'
'sed'
'rootfs')
makedepends=('diffutils'
'gawk'
'texinfo')
checkdepends=('autoconf'
'automake'
'findutils')
source=('https://ftp.gnu.org/gnu/libtool/libtool-2.5.4.tar.xz')
md5sums=('22e0a29df8af5fdde276ea3a7d351d30')
build(){
cd ${pkgname}-${pkgver}
./configure --prefix=/usr
make
}
check(){
cd ${pkgname}-${pkgver}
make check
}
package(){
cd ${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
# Remove a useless static library
rm -fv ${pkgdir}/usr/lib/libltdl.a
}
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 libtool-2.5.4-1-$(uname -m).pkg.tar.xz \
/srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
/srv/pacman/repos/LFS/libtool-2.5.4-1-$(uname -m).pkg.tar.xz
Update the local cache and install the Libtool package:
pacman -Syu pacman -S libtool --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean up the build directory:
mkdir /srv/pacman/source/LFS/libtool cp PKGBUILD /srv/pacman/source/LFS/libtool cd /sources rm -rf libtool