8.53.2. Contents of XML::Parser
Installed module:
Expat.so
The XML::Parser module is a Perl interface to James Clark's XML parser, Expat.
Create the PKGBUILD for the XML::Parser package with the following commands:
mkdir /sources/xml-parser
cd /sources/xml-parser
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="xml-parser"
pkgver="2.47"
pkgrel="1"
pkgdesc="The XML::Parser module is a Perl interface to James Clark's XML parser, Expat."
arch=('x86'
'x86_64')
url="https://github.com/chorny/XML-Parser"
license=('custom')
groups=('core')
source=('https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.47.tar.gz')
md5sums=('89a8e82cfd2ad948b349c0a69c494463')
build(){
cd ${_pkgname}-${pkgver}
perl Makefile.PL
make
}
check(){
cd ${_pkgname}-${pkgver}
make test
}
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 xml-parser-2.47-1-$(uname -m).pkg.tar.xz \
/srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
/srv/pacman/repos/LFS/xml-parser-2.47-1-$(uname -m).pkg.tar.xz
Update the local cache and install the XML::Parser package:
pacman -Syu pacman -S xml-parser --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean up the build directory:
mkdir /srv/pacman/source/LFS/xml-parser cp PKGBUILD /srv/pacman/source/LFS/xml-parser cd /sources rm -rf xml-parser