The libtirpc package contains libraries that support programs that use the Remote Procedure Call (RPC) API. It replaces the RPC, but not the NIS library entries that used to be in glibc.
mkdir /sources/libtirpc
cd /sources/libtirpc
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="libtirpc"
pkgver="1.3.6"
pkgrel="1"
pkgdesc="The libtirpc package contains libraries that support programs that use the Remote Procedure Call (RPC) API."
arch=('x86'
'x86_64')
license=('BSD3C')
# Conditional dependencies (commendted $() cases below) can be used in a
# complete environment, but not the limted environment in Chapter 8
# because the pacman database is not yet complete.
# These two examples would be used in depends/makedepends and optdepends
# respectively, and would add to the depends and makedepends arrays in
# the binary package if they are installed, or add to the optdepends
# array if not installed:
# $(pacman -Q mitkrb5 >/dev/null 2>&1 && echo 'mitkrb5')
# $(pacman -Q mitkrb5 >/dev/null 2>&1 || echo 'mitkrb5: provide GSSAPI support')
# Note the optional description for the optdepends test variant above
# Also, take care with condtionals in PKGBUILD files as they are run by
# bash +e. If a negative pipestatus is possible, use a subshell as above.
depends=('glibc')
makedepends=('binutils'
'coreutils'
'gcc'
'glibc'
'grep'
'make'
'sed')
optdepends=('mitkrb5')
backup=('etc/netconfig')
source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
md5sum=('8de9e6af16c4bc65ba40d0924745f5b7')
build() {
# Optional deps must be handled here too if necesasry, for example:
# _confargs=""
# pacman -Q mitkrb5 >/dev/null 2>&1 || _confargs="${_confargs} --disable-gssapi"
# Replace the "--disable-gssapi" argument with "${_confargs}" once in a full
# build environment
cd ${pkgname}-${pkgver}
./configure --prefix=/usr \
--sysconf=/etc \
--disable-static --disable-gssapi
make
}
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:
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
/srv/pacman/repos/LFS/libtirpc-1.3.6-1-$(uname -m).pkg.tar.xz
Update the local cache and install the libtirpc package:
pacman -Syu pacman -S libtirpc --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean up the build directory:
mkdir /srv/pacman/source/LFS/libtirpc cp PKGBUILD /srv/pacman/source/LFS/libtirpc cd /sources rm -rf libtirpc
--disable-gssapi: This
switch is needed if no GSSAPI is installed. Remove this switch if
you have one installed (for example MIT KRB 5) and you wish to use
it.