The libassuan package contains an inter process communication library used by some of the other GnuPG related packages. libassuan's primary use is to allow a client to interact with a non-persistent server. libassuan is not, however, limited to use with GnuPG servers and clients. It was designed to be flexible enough to meet the demands of many transaction based environments with non-persistent servers.
Create the PKGBUILD for the Libassuan package with the following commands:
mkdir /sources/libassuan
cd /sources/libassuan
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="libassuan"
pkgver="3.0.2"
pkgrel="1"
pkgdesc="${pkgname} ${pkgver}"
arch=('x86'
'x86_64')
url="https://www.gnupg.org/ftp/gcrypt"
license=('GPLv3'
'LGPLv2.1')
groups=('core')
depends=('glibc'
'libgpg-error')
makedepends=('bash'
'binutils'
'coreutils'
'gawk'
'gcc'
'grep'
'inetutils'
'make'
'readline'
'sed')
optdepends=('texlive')
source=('https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-3.0.2.tar.bz2')
md5sums=('c6f1bf4bd2aaa79cd1635dcc070ba51a')
build(){
cd "${pkgname}-${pkgver}"
./configure --prefix=/usr
make
# Build the documenatation
make -C doc html
makeinfo --html --no-split -o doc/assuan_nochunks.html doc/assuan.texi
makeinfo --plaintext -o doc/assuan.txt doc/assuan.texi
}
check(){
cd "${pkgname}-${pkgver}"
make check
}
package(){
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}/" install
# Install documentation
install -vdm755 ${pkgdir}/usr/share/doc/libassuan-${pkgver}/html
install -vm644 doc/assuan.html/* \
${pkgdir}/usr/share/doc/libassuan-${pkgver}/html
install -vm644 doc/assuan_nochunks.html \
${pkgdir}/usr/share/doc/libassuan-${pkgver}
install -vm644 doc/assuan.{txt,texi} \
${pkgdir}/usr/share/doc/libassuan-${pkgver}
}
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 libassuan-3.0.2-1-$(uname -m).pkg.tar.xz \
/srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
/srv/pacman/repos/LFS/libassuan-3.0.2-1-$(uname -m).pkg.tar.xz
Update the local cache and install the Libassuan package:
pacman -Syu pacman -S libassuan --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean up the build directory:
mkdir /srv/pacman/source/LFS/libassuan cp PKGBUILD /srv/pacman/source/LFS/libassuan cd /sources rm -rf libassuan