1SUMMARY = "A password/passphrase strength checking and enforcement toolset"
2DESCRIPTION = "\
3passwdqc is a password/passphrase strength checking and policy enforcement \
4toolset, including an optional PAM module (pam_passwdqc), command-line \
5programs (pwqcheck and pwqgen), and a library (libpasswdqc). \
6pam_passwdqc is normally invoked on password changes by programs such as \
7passwd(1).  It is capable of checking password or passphrase strength, \
8enforcing a policy, and offering randomly-generated passphrases, with \
9all of these features being optional and easily (re-)configurable. \
10\
11pwqcheck and pwqgen are standalone password/passphrase strength checking \
12and random passphrase generator programs, respectively, which are usable \
13from scripts. \
14\
15libpasswdqc is the underlying library, which may also be used from \
16third-party programs. \
17"
18
19HOMEPAGE = "http://www.openwall.com/passwdqc"
20SECTION = "System Environment/Base"
21
22DEPENDS += "libpam"
23
24inherit features_check
25REQUIRED_DISTRO_FEATURES = "pam"
26
27LICENSE = "BSD-1-Clause"
28LIC_FILES_CHKSUM = "file://LICENSE;md5=ac99c8678577a1c2f9f04cccee411d5d"
29
30SRC_URI = "http://www.openwall.com/${BPN}/${BP}.tar.gz \
31           file://makefile-add-ldflags.patch \
32          "
33SRC_URI[sha256sum] = "53b0f4bc49369f06195e9e13abb6cff352d5acb79e861004ec95973896488cf4"
34
35# explicitly define LINUX_PAM in case DISTRO_FEATURES no pam
36# this package's pam_passwdqc.so needs pam
37CFLAGS:append = " -Wall -fPIC -DHAVE_SHADOW -DLINUX_PAM"
38
39# -e is no longer default setting in bitbake.conf
40EXTRA_OEMAKE = "-e"
41
42do_compile() {
43    # make sure sub make use environment to override variables in Makefile
44    # Linux)    $(MAKE), there is a tab between
45    sed -i -e 's/Linux)	$(MAKE) CFLAGS_lib/Linux)	$(MAKE) -e CFLAGS_lib/' ${S}/Makefile
46
47    # LD_lib and LD must be CC because of Makefile
48    oe_runmake LD="${CC}"
49}
50
51do_install() {
52    oe_runmake install DESTDIR=${D} SHARED_LIBDIR=${base_libdir} \
53           DEVEL_LIBDIR=${libdir} SECUREDIR=${base_libdir}/security \
54           INSTALL="install -p"
55}
56
57PROVIDES += "pam-${BPN}"
58PACKAGES =+ "lib${BPN} pam-${BPN}"
59
60FILES:lib${BPN} = "${base_libdir}/libpasswdqc.so.1"
61FILES:pam-${BPN} = "${base_libdir}/security/pam_passwdqc.so"
62FILES:${PN}-dbg += "${base_libdir}/security/.debug"
63
64RDEPENDS:${PN} = "lib${BPN} pam-${BPN}"
65RDEPENDS:pam-${BPN} = "lib${BPN}"
66