#!/bin/sh
#
# Copyright 2005-2006 Paul Blazejowski and Zach Borgerding
# Available under the terms of the GNU GPL.
#

NAME="cracklib"
VERSION="2.8.15"
REVISION="1"

PKG_SOURCEURL='http://$DLG_SFMIRROR.dl.sourceforge.net/sourceforge/$NAME/$NAME-$VERSION.tar.gz'

. $DLG_ROOT/config
. $DLG_ROOT/SCRIPTS/dropline-functions.sh

cflags
cxxflags
prepare
analyzesource
configure --libdir=/lib$LIBSUFFIX \
	--with-default-dict=/var/cache/cracklib/cracklib_dict 
make
makecheck
makeinstall install-strip
tidydocumentation
analyzebinaries

# install the wordlist 
createdir $PKG_STAGEROOT$PKG_PREFIX/share/cracklib
createdir $PKG_STAGEROOT/var/cache/cracklib
# Copy the default dictionary cracklib ships with into the package
spewdo "install -m 644 $PKG_SRCROOT/dicts/cracklib-small $PKG_STAGEROOT$PKG_PREFIX/share/cracklib/"
# These entries already exist in Slackware's /etc/magic file
spewdo "rm -f $PKG_STAGEROOT$PKG_PREFIX/share/cracklib/cracklib.magic"

finalizepackage
packagize
exit
cleanup

