############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = cracklib version = 2.8.12 release = 1 groups = Security/Password url = http://sourceforge.net/projects/cracklib/ license = GPLv2 summary = A password-checking library. description CrackLib tests passwords to determine whether they match certain \ security-oriented characteristics, with the purpose of stopping users \ from choosing passwords that are easy to guess. CrackLib performs \ several tests on passwords: it tries to generate words from a username \ and gecos entry and checks those words against the password; it checks \ for simplistic patterns in passwords; and it checks for the password \ in a dictionary. end source_dl = sources += cracklib-words-20080507.gz build requires python-devel end configure_options += \ --with-default-dict=/lib/cracklib/pw_dict \ --with-python \ --disable-static # Only extract the source tarball. prepare cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}.tar.gz # Apply all patches. %{MACRO_PATCHES} end install_cmds mkdir -pv %{BUILDROOT}/{,usr/}lib mv -v %{BUILDROOT}/usr/lib/libcrack.so.2* %{BUILDROOT}/lib ln -vsf ../../lib/libcrack.so.2.8.0 %{BUILDROOT}/usr/lib/libcrack.so mkdir -pv %{BUILDROOT}/usr/share/dict install -v -m644 -D %{DIR_DL}/cracklib-words-20080507.gz \ %{BUILDROOT}/usr/share/dict/cracklib-words.gz gunzip -v %{BUILDROOT}/usr/share/dict/cracklib-words.gz ln -v -s cracklib-words %{BUILDROOT}/usr/share/dict/words echo -ne "%{DISTRO_NAME}\n%{DISTRO_SNAME}\n" >> \ %{BUILDROOT}/usr/share/dict/cracklib-extra-words mkdir -pv %{BUILDROOT}/lib/cracklib chmod a+x util/cracklib-{format,packer} util/cracklib-format \ %{BUILDROOT}/usr/share/dict/cracklib-words \ %{BUILDROOT}/usr/share/dict/cracklib-extra-words | \ util/cracklib-packer \ %{BUILDROOT}/lib/cracklib/pw_dict end end packages package %{name} requires = %{name}-dicts end package %{name}-devel template DEVEL end # We build an extra package with the dictionaries. package %{name}-dicts summary = Dictionaries for %{thisapp}. description = %{summary} files /lib/cracklib /usr/share/dict* end end # We build an extra python package with the bindings for it. package python-cracklib summary = Python bindings for ${thisapp}. description = %{summary} files = /usr/lib*/python* end end