pkgname=(libxcrypt libxcrypt-compat) pkgbase=libxcrypt pkgver=4.4.37 pkgrel=1 pkgdesc="Modern library for one-way hashing of passwords" arch=('x86_64') url="https://github.com/besser82/libxcrypt/" license=('LGPL-2.1-or-later') depends=('glibc') source=(https://github.com/besser82/libxcrypt/releases/download/v${pkgver}/${pkgbase}-${pkgver}.tar.xz) sha256sums=(902aa2976f959b5ebe55679b1722b8479f8f13cd4ce2ef432b0a84ae298fffd0) prepare() { cd ${pkgbase}-${pkgver} install -vdm755 build-libxcrypt build-libxcrypt-compat } build() { cd ${pkgbase}-${pkgver} local configure_args=( --disable-static --disable-failure-tokens ${configure_options} ) ( cd build-libxcrypt ../configure ${configure_args[@]} \ --enable-hashes=strong,glibc \ --enable-obsolete-api=no make ) ( cd build-libxcrypt-compat ../configure ${configure_args[@]} \ --enable-hashes=strong,glibc \ --enable-obsolete-api=glibc make ) } package_libxcrypt() { cd ${pkgbase}-${pkgver}/build-libxcrypt make DESTDIR=${pkgdir} install } package_libxcrypt-compat() { pkgdesc='Modern library for one-way hashing of passwords - legacy API functions' depends=('libxcrypt') cd ${pkgbase}-${pkgver}/build-libxcrypt-compat make DESTDIR=${pkgdir} install rm -rf ${pkgdir}/usr/{include,lib64/{lib*.so,pkgconfig},share} }