From f75af3af66dff97c60dc5f6b9c3c7732070cfb92 Mon Sep 17 00:00:00 2001 From: Christopher Walker Date: Wed, 12 May 2010 23:30:04 +0200 Subject: libraries/cracklib: Added to 12.2 repository --- libraries/cracklib/README | 13 ++++++ libraries/cracklib/cracklib.SlackBuild | 80 ++++++++++++++++++++++++++++++++++ libraries/cracklib/cracklib.info | 8 ++++ libraries/cracklib/slack-desc | 19 ++++++++ 4 files changed, 120 insertions(+) create mode 100644 libraries/cracklib/README create mode 100644 libraries/cracklib/cracklib.SlackBuild create mode 100644 libraries/cracklib/cracklib.info create mode 100644 libraries/cracklib/slack-desc (limited to 'libraries/cracklib') diff --git a/libraries/cracklib/README b/libraries/cracklib/README new file mode 100644 index 0000000000..f9c32adf23 --- /dev/null +++ b/libraries/cracklib/README @@ -0,0 +1,13 @@ +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 guessed by "Crack" by filtering them out at the source. + +An example of its use can be located in the SAMBA examples directory. +The crackcheck program included with SAMBA will use the library to ensure +that the user doesn't pick a weak password. + +A larger dictionary can be found here +http://downloads.sourceforge.net/cracklib/cracklib-words-20080507.gz diff --git a/libraries/cracklib/cracklib.SlackBuild b/libraries/cracklib/cracklib.SlackBuild new file mode 100644 index 0000000000..2a289ebb4d --- /dev/null +++ b/libraries/cracklib/cracklib.SlackBuild @@ -0,0 +1,80 @@ +#!/bin/sh + +# Slackware build script for cracklib +# Written by Christopher Walker + +PRGNAM=cracklib +VERSION=${VERSION:-2.8.13} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +DICT=${DICT:-cracklib-words-20080507} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --mandir=/usr/man \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --enable-shared \ + --disable-static \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +# Install large cracklib dictionary file if it exists +( cd $PKG/usr/share/cracklib + if [ -e $CWD/${DICT}.gz ]; then + zcat $CWD/${DICT}.gz > $PRGNAM-large + elif [ -e $CWD/${DICT} ]; then + cat $CWD/${DICT} > $PRGNAM-large + fi +) + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +#find $PKG/usr/man -type f -exec gzip -9 {} \; + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + ABOUT-NLS AUTHORS COPYING INSTALL NEWS README* \ + $PKG/usr/doc/$PRGNAM-$VERSION +chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/* + +mkdir $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/libraries/cracklib/cracklib.info b/libraries/cracklib/cracklib.info new file mode 100644 index 0000000000..66897084f5 --- /dev/null +++ b/libraries/cracklib/cracklib.info @@ -0,0 +1,8 @@ +PRGNAM="cracklib" +VERSION="2.8.13" +HOMEPAGE="http://sourceforge.net/projects/cracklib" +DOWNLOAD="http://downloads.sourceforge.net/cracklib/cracklib-2.8.13.tar.gz" +MD5SUM="5beb4c6b3c31c83fc98c4c225b25cd94" +MAINTAINER="Christopher Walker" +EMAIL="kris240376@gmail.com" +APPROVED="rworkman" diff --git a/libraries/cracklib/slack-desc b/libraries/cracklib/slack-desc new file mode 100644 index 0000000000..eac4a5414c --- /dev/null +++ b/libraries/cracklib/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +cracklib: cracklib (password crack library) +cracklib: +cracklib: CrackLib is a library containing a C function (well, lots of functions +cracklib: really, but you only need to use one of them) which may be used in a +cracklib: "passwd"-like program. +cracklib: +cracklib: The idea is simple: try to prevent users from choosing passwords that +cracklib: could be guessed by "Crack" by filtering them out, at source. +cracklib: +cracklib: +cracklib: -- cgit v1.2.3