description="Contains the public client interface for NIS(YP) and NIS+."
url="https://github.com/thkukuk/libnsl"

contributors="Rems,Tnut"
packager="spiky <spiky@nutyx.org>"

makedepends=(libtool rpcsvc-proto libtirpc)

name=libnsl
version=2.0.0

PKGMK_KEEP_SOURCES="no"
source=(https://github.com/thkukuk/libnsl/archive/v$version.tar.gz)

build() {
cd $name-$version
autoreconf -fiv

./configure --sysconfdir=/etc \
            --disable-static

make
make DESTDIR=$PKG install

mkdir $PKG/lib
mv $PKG/usr/lib/libnsl.so.3* \
$PKG/lib
ln -sfv ../../lib/libnsl.so.3.0.0 $PKG/usr/lib/libnsl.so

# Obsolet lib
rm $PKG/usr/lib/libnsl.la
}
