blob: 3bd3f93674e0c3ba78f6a7d46c92e5b2250d23cb [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Password strength checker library"
2HOMEPAGE = "http://sourceforge.net/projects/cracklib"
3
4LICENSE = "LGPLv2.1+"
5LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
6
7DEPENDS = "cracklib-native zlib python"
8RDEPEND_${PN}-python += "python"
9
10PACKAGES += "${PN}-python"
11
12EXTRA_OECONF = "--with-python --libdir=${base_libdir}"
13
14SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \
15 file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \
16 file://0002-craklib-fix-testnum-and-teststr-failed.patch"
17
18SRC_URI[md5sum] = "376790a95c1fb645e59e6e9803c78582"
19SRC_URI[sha256sum] = "59ab0138bc8cf90cccb8509b6969a024d5e58d2d02bcbdccbb9ba9b88be3fa33"
20
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050021UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/cracklib/files/cracklib/"
22UPSTREAM_CHECK_REGEX = "/cracklib/(?P<pver>(\d+[\.\-_]*)+)/"
23
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024inherit autotools gettext pythonnative python-dir
25
26do_install_append_class-target() {
27 create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small
28}
29
30do_install_append() {
31 src_dir="${D}${base_libdir}/${PYTHON_DIR}/site-packages"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050032 rm -f $src_dir/test_cracklib.py*
33
34 if [ "${base_libdir}" != "${libdir}" ] ; then
35 # Move python files from ${base_libdir} to ${libdir} since used --libdir=${base_libdir}
36 install -d -m 0755 ${D}${PYTHON_SITEPACKAGES_DIR}/
37 mv $src_dir/* ${D}${PYTHON_SITEPACKAGES_DIR}
38 rm -fr ${D}${base_libdir}/${PYTHON_DIR}
39 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040}
41
42BBCLASSEXTEND = "native nativesdk"
43
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050044FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/cracklib.py* \
45 ${PYTHON_SITEPACKAGES_DIR}/_cracklib.*"
46
47FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_cracklib.a"