8.54.1. Installation of Intltool
Create the PKGBUILD for the Intltool package with the following
commands:
mkdir /sources/intltool
cd /sources/intltool
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="intltool"
pkgver="0.51.0"
pkgrel="1"
pkgdesc="The Intltool is used for extracting translatable strings from source files."
arch=('x86'
'x86_64')
url="https://freedesktop.org/wiki/Software/intltool"
license=('GPLv2')
groups=('core')
depends=('autoconf'
'automake'
'bash'
'glibc'
'grep'
'perl'
'sed'
'rootfs')
makedepends=('gawk'
'xml-parser')
checkdepends=('perl')
source=('https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz')
md5sums=('12e517cac2b57a0121cda351570f1e63')
prepare(){
cd ${pkgname}-${pkgver}
# Fix a warning that is caused by perl-5.22 and later
sed -i 's:\\\${:\\\$\\{:' intltool-update.in
}
build(){
cd ${pkgname}-${pkgver}
./configure --prefix=/usr
make
}
check(){
cd ${pkgname}-${pkgver}
make check
}
package(){
cd ${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
install -v -Dm644 doc/I18N-HOWTO ${pkgdir}/usr/share/doc/intltool-${pkgver}/I18N-HOWTO
}
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 intltool-0.51.0-1-$(uname -m).pkg.tar.xz \
/srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
/srv/pacman/repos/LFS/intltool-0.51.0-1-$(uname -m).pkg.tar.xz
Update the local cache and install the Intltool package:
pacman -Syu
pacman -S intltool --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean
up the build directory:
mkdir /srv/pacman/source/LFS/intltool
cp PKGBUILD /srv/pacman/source/LFS/intltool
cd /sources
rm -rf intltool