# Description: Extended crypt library for descrypt, md5crypt, bcrypt, and others
# URL: https://github.com/besser82/libxcrypt
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: glibc-32

name=libxcrypt-32
version=4.5.2
release=1
source=(https://github.com/besser82/libxcrypt/releases/download/v$version/libxcrypt-$version.tar.xz)

build() {
    cd libxcrypt-$version

    ./configure --prefix=/usr \
        --libdir=/usr/lib32 \
        --enable-hashes=strong,glibc \
        --enable-obsolete-api=no \
        --enable-shared \
        --enable-static \
        --with-pkgconfigdir=/usr/lib32/pkgconfig \
        --disable-failure-tokens \
        --disable-silent-rules \
        --disable-valgrind

    make
    make DESTDIR=$PKG install

    rm -r $PKG/usr/{include,share}
}
