cracklib/PKGBUILD

52 lines
1.5 KiB
Bash
Raw Normal View History

2024-04-29 19:29:42 +08:00
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=cracklib
pkgver=2.9.11
pkgrel=1
pkgdesc="Password Checking Library"
arch=('x86_64')
url="https://github.com/cracklib/cracklib"
license=('GPL')
depends=('glibc' 'zlib')
makedepends=('python')
install=${pkgname}.install
source=(https://github.com/cracklib/cracklib/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz
https://github.com/cracklib/cracklib/releases/download/v${pkgver}/${pkgname}-words-${pkgver}.xz)
sha256sums=(2c83a91dd21d035eab98bded764eb4579b73fd837b683e1a447b11ef604ee130
b3d1e0e0ae9bc7ffed65c0042d7c68bdb903368aa6b918f94572453c6ea874dc)
prepare() {
cd ${pkgname}-${pkgver}
autoreconf -fiv
}
build() {
cd ${pkgname}-${pkgver}
PYTHON=python3 \
${CONFIGURE} \
--disable-static \
--with-default-dict=/usr/share/cracklib/pw_dict
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
install -vDm644 ${srcdir}/${pkgname}-words-${pkgver}.xz ${pkgdir}/usr/share/dict/cracklib-words.xz
unxz -v ${pkgdir}/usr/share/dict/cracklib-words.xz
ln -v -sf cracklib-words ${pkgdir}/usr/share/dict/words
echo futurelinux >> ${pkgdir}/usr/share/dict/cracklib-extra-words
install -v -m755 -d ${pkgdir}/usr/share/cracklib
}