cracklib: split library into its own subpkg; add cross build support.

This commit is contained in:
Juan RP 2013-02-07 05:06:39 +01:00
parent 93b98bdd10
commit e13224f960
7 changed files with 49 additions and 11 deletions

View File

@ -169,7 +169,7 @@ libattr.so.1 attr-2.4.43_1
libacl.so.1 acl-2.2.47_1
libpython2.7.so.1.0 python-2.7_1
libffi.so.5 libffi-3.0.8_1
libcrack.so.2 cracklib-2.8.0_1
libcrack.so.2 libcracklib-2.8.22_2
libpam.so.0 pam-1.0.0_1
libpam_misc.so.0 pam-1.0.0_1
libcap.so.2 libcap-2.16_1

8
srcpkgs/cracklib/INSTALL Normal file
View File

@ -0,0 +1,8 @@
case ${ACTION} in
post)
echo "Generating cracklib dictionary..."
usr/bin/create-cracklib-dict -o usr/share/cracklib/pw_dict \
usr/share/cracklib/cracklib-words || exit 1
;;
esac

8
srcpkgs/cracklib/REMOVE Normal file
View File

@ -0,0 +1,8 @@
case ${ACTION} in
pre)
if [ "$UPDATE" = "no" ]; then
rm -f usr/share/cracklib/pw_dict.*
fi
;;
esac

View File

@ -1,7 +1,7 @@
# Template file for 'cracklib-devel'.
#
noarch=yes
depends="zlib-devel cracklib>=${version}"
depends="zlib-devel libcracklib>=${version}"
short_desc="${short_desc} -- development files"
do_install() {

View File

@ -0,0 +1,8 @@
# Template file for 'libcracklib'.
#
short_desc="${short_desc} -- runtime library"
replaces="cracklib<2.8.22_2"
do_install() {
vmove "usr/lib/*.so*" usr/lib
}

View File

@ -1,21 +1,34 @@
# Template file for 'cracklib'
pkgname=cracklib
version=2.8.22
revision=1
subpackages="${pkgname}-devel ${pkgname}-python"
revision=2
subpackages="libcracklib ${pkgname}-devel ${pkgname}-python"
create_wrksrc=yes
build_wrksrc="${pkgname}-${version}"
build_style=gnu-configure
configure_args="--disable-static"
makedepends="python-devel zlib-devel"
makedepends="python-devel"
crossmakedepends="${makedepends}"
short_desc="Password Checking Library"
maintainer="Juan RP <xtraeme@gmail.com>"
license="LGPL-2.1"
homepage="http://cracklib.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/cracklib/$pkgname-$version.tar.gz"
checksum=feaff49bfb513ec10b2618c00d2f7f60776ba93fcc5fa22dd3479dd9cad9f770
distfiles="
${SOURCEFORGE_SITE}/cracklib/${pkgname}-${version}.tar.gz
${SOURCEFORGE_SITE}/cracklib/${pkgname}-words-1.2.gz"
checksum="
feaff49bfb513ec10b2618c00d2f7f60776ba93fcc5fa22dd3479dd9cad9f770
9b323c100780f2a817ab3de082b8bfaa4478bfa174dcbd016810ed8be60cbe16"
if [ -n "$XBPS_CROSS_TRIPLET" ]; then
makedepends="automake gettext-devel ${makedepends}"
pre_configure() {
sed -i "s|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g" -i configure.in
autoreconf -fi
}
fi
post_install() {
# Create default small wordlist.
vmkdir usr/share/cracklib
sh ./util/cracklib-format dicts/cracklib-small \
| sh ./util/cracklib-packer ${DESTDIR}/usr/share/cracklib/pw_dict
[ -e ../cracklib-words-1.2.gz ] && gunzip ../cracklib-words-1.2.gz
vinstall ../cracklib-words-1.2 644 usr/share/cracklib cracklib-words
}

1
srcpkgs/libcracklib Symbolic link
View File

@ -0,0 +1 @@
cracklib