blob: b148fdcb598cb206e8ebbf22e833364e464a1a33 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "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
Brad Bishop8410d612019-11-25 09:40:59 -050024inherit features_check
Brad Bishop316dfdd2018-06-25 12:45:53 -040025REQUIRED_DISTRO_FEATURES = "pam"
26
Brad Bishop2d39a062019-10-28 08:33:36 -040027LICENSE = "BSD-1-Clause"
Brad Bishop316dfdd2018-06-25 12:45:53 -040028LIC_FILES_CHKSUM = "file://LICENSE;md5=1b4af6f3d4ee079a38107366e93b334d"
29
30SRC_URI = "http://www.openwall.com/${BPN}/${BP}.tar.gz \
31 file://makefile-add-ldflags.patch \
32 "
33SRC_URI[md5sum] = "3878b57bcd3fdbcf3d4b362dbc6228b9"
34SRC_URI[sha256sum] = "d1fedeaf759e8a0f32d28b5811ef11b5a5365154849190f4b7fab670a70ffb14"
35
36# explicitly define LINUX_PAM in case DISTRO_FEATURES no pam
37# this package's pam_passwdqc.so needs pam
Patrick Williams213cb262021-08-07 19:21:33 -050038CFLAGS:append = " -Wall -fPIC -DHAVE_SHADOW -DLINUX_PAM"
Brad Bishop316dfdd2018-06-25 12:45:53 -040039
40# -e is no longer default setting in bitbake.conf
41EXTRA_OEMAKE = "-e"
42
43do_compile() {
44 # make sure sub make use environment to override variables in Makefile
45 # Linux) $(MAKE), there is a tab between
46 sed -i -e 's/Linux) $(MAKE) CFLAGS_lib/Linux) $(MAKE) -e CFLAGS_lib/' ${S}/Makefile
47
48 # LD_lib and LD must be CC because of Makefile
49 oe_runmake LD="${CC}"
50}
51
52do_install() {
53 oe_runmake install DESTDIR=${D} SHARED_LIBDIR=${base_libdir} \
54 DEVEL_LIBDIR=${libdir} SECUREDIR=${base_libdir}/security \
55 INSTALL="install -p"
56}
57
58PROVIDES += "pam-${BPN}"
59PACKAGES =+ "lib${BPN} pam-${BPN}"
60
Patrick Williams213cb262021-08-07 19:21:33 -050061FILES:lib${BPN} = "${base_libdir}/libpasswdqc.so.0"
62FILES:pam-${BPN} = "${base_libdir}/security/pam_passwdqc.so"
63FILES:${PN}-dbg += "${base_libdir}/security/.debug"
Brad Bishop316dfdd2018-06-25 12:45:53 -040064
Patrick Williams213cb262021-08-07 19:21:33 -050065RDEPENDS:${PN} = "lib${BPN} pam-${BPN}"
66RDEPENDS:pam-${BPN} = "lib${BPN}"