# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
github.setup cracklib cracklib 2.9.7 v
description A ProActive Password Sanity Library
long_description CrackLib is a library containing a C function (well, \
lots of functions really, but you only need to use \
one of them) which may be used in a passwd-like \
program. The idea is simple: try to prevent users \
from choosing passwords that could be guessed by \
Crack by filtering them out, at source.
depends_build port:autoconf \
depends_lib port:gettext \
checksums rmd160 1f03d3f7203aad5e7f239e4fd170dd56b1a84af5 \
sha256 11cdb4cb8fcdac7dd4b75b87142e3fee07fd42a709a0d9a69e07094d9a601ba3 \
worksrcdir ${distname}/src
patchfiles autogen.sh.patch
configure.cmd ./autogen.sh && ./configure
configure.args --without-python
# generate updated version of cracklib-words file
# previously provided by port cracklib-words
# now part of the cracklib github distribution
system -W ${workpath}/${distname} \
"${prefix}/bin/bzcat `/usr/bin/find words/files -type f` | LC_CTYPE=C /usr/bin/tr ':upper:' ':lower:' | LC_CTYPE=C /usr/bin/sort -u > src/dicts/cracklib-words"
# replace installed default words file cracklib-small with generated cracklib-words
# and generate corresponding pw_dict database using cracklib-packer
delete ${destroot}${prefix}/share/cracklib/cracklib-small
copy ${worksrcpath}/dicts/cracklib-words ${destroot}${prefix}/share/cracklib
system "DYLD_LIBRARY_PATH=${destroot}${prefix}/lib ${destroot}${prefix}/sbin/cracklib-packer ${destroot}${prefix}/share/cracklib/pw_dict < ${destroot}${prefix}/share/cracklib/cracklib-words"