The libnsl package contains the public client interface for NIS(YP). It replaces the NIS library that used to be in glibc.
Create the PKGBUILD for the Libnsl package with the following commands:
mkdir /sources/zlib
cd /sources/zlib
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="libnsl"
pkgver="2.0.0"
pkgrel="1"
pkgdesc="The libnsl package contains the public client interface for NIS(YP) and NIS+."
arch=(x86_64)
license=('LGPLv2.1'
'LGPLv3')
# Optional Dependencies:
# $(pacman -Q keyutils >/dev/null 2>&1 && echo 'keyutils')
# $(pacman -Q mitkrb5 >/dev/null 2>&1 && echo 'mitkrb5')
depends=('glibc'
'libtirpc')
makedepends=('bash'
'binutils'
'coreutils'
'gcc'
'gettext'
'glibc'
'grep'
'libtirpc'
'sed')
# $(pacman -Q keyutils >/dev/null 2>&1 || echo 'keyutils:use key management')
# $(pacman -Q mitkrb5 >/dev/null 2>&1 || echo 'mitkrb5:add GSSAPI suppot')
optdepends=('keyutils'
'mitkrb5')
source=("https://github.com/thkukuk/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
md5sums('1e8c0615071ea13202452304de1eaab9')
build() {
cd "${pkgname}-${pkgver}"
./configure --sysconfdir=/etc --disable-static
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/libnsl-2.0.0-1-$(uname -m).pkg.tar.xz
Update the local cache and install the Libnsl package:
pacman -Syu pacman -S libnsl --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean up the build directory:
mkdir /srv/pacman/source/LFS/libnsl cp PKGBUILD /srv/pacman/source/LFS/libnsl cd /sources rm -rf libnsl