Portfile

# $Id: Portfile 20461 2006-11-03 15:14:39Z blair@macports.org $
PortSystem 1.0

name cracklib
version 2.7
categories security
maintainers nomaintainer@macports.org
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.
homepage http://www.crypticide.com/users/alecm/
master_sites http://www.crypticide.com/users/alecm/security/
distname ${name},${version}
checksums md5 0c84ad7413d9dd3e5c2eaa5f97d53c4a
platforms darwin

patchfiles patch-Makefile \
patch-cracklib-Makefile \
patch-util-Makefile \
patch-util-mkdict
post-patch {
file copy ${filespath}/cracklib.3 ${worksrcpath}/cracklib
file copy ${filespath}/mkdict.1 ${worksrcpath}/util
file copy ${filespath}/teststr.1 ${worksrcpath}/util
}

configure {
cd ${worksrcpath}
reinplace "s|@PREFIX@|${prefix}|g" util/mkdict.1 util/teststr.1
}

build.args PREFIX=${prefix} VERSION=${version}
destroot.args PREFIX=${prefix} VERSION=${version}
post-destroot {
set docPath "${prefix}/share/doc/${name}"
xinstall -d -m 0755 ${destroot}${docPath}
xinstall -m 0644 ${worksrcpath}/README ${destroot}${docPath}
}

files