Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "A password/passphrase strength checking and enforcement toolset" |
| 2 | DESCRIPTION = "\ |
| 3 | passwdqc is a password/passphrase strength checking and policy enforcement \ |
| 4 | toolset, including an optional PAM module (pam_passwdqc), command-line \ |
| 5 | programs (pwqcheck and pwqgen), and a library (libpasswdqc). \ |
| 6 | pam_passwdqc is normally invoked on password changes by programs such as \ |
| 7 | passwd(1). It is capable of checking password or passphrase strength, \ |
| 8 | enforcing a policy, and offering randomly-generated passphrases, with \ |
| 9 | all of these features being optional and easily (re-)configurable. \ |
| 10 | \ |
| 11 | pwqcheck and pwqgen are standalone password/passphrase strength checking \ |
| 12 | and random passphrase generator programs, respectively, which are usable \ |
| 13 | from scripts. \ |
| 14 | \ |
| 15 | libpasswdqc is the underlying library, which may also be used from \ |
| 16 | third-party programs. \ |
| 17 | " |
| 18 | |
| 19 | HOMEPAGE = "http://www.openwall.com/passwdqc" |
| 20 | SECTION = "System Environment/Base" |
| 21 | |
| 22 | DEPENDS += "libpam" |
| 23 | |
| 24 | inherit distro_features_check |
| 25 | REQUIRED_DISTRO_FEATURES = "pam" |
| 26 | |
| 27 | LICENSE = "BSD" |
| 28 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1b4af6f3d4ee079a38107366e93b334d" |
| 29 | |
| 30 | SRC_URI = "http://www.openwall.com/${BPN}/${BP}.tar.gz \ |
| 31 | file://makefile-add-ldflags.patch \ |
| 32 | " |
| 33 | SRC_URI[md5sum] = "3878b57bcd3fdbcf3d4b362dbc6228b9" |
| 34 | SRC_URI[sha256sum] = "d1fedeaf759e8a0f32d28b5811ef11b5a5365154849190f4b7fab670a70ffb14" |
| 35 | |
| 36 | # explicitly define LINUX_PAM in case DISTRO_FEATURES no pam |
| 37 | # this package's pam_passwdqc.so needs pam |
| 38 | CFLAGS_append += "-Wall -fPIC -DHAVE_SHADOW -DLINUX_PAM" |
| 39 | |
| 40 | # -e is no longer default setting in bitbake.conf |
| 41 | EXTRA_OEMAKE = "-e" |
| 42 | |
| 43 | do_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 | |
| 52 | do_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 | |
| 58 | PROVIDES += "pam-${BPN}" |
| 59 | PACKAGES =+ "lib${BPN} pam-${BPN}" |
| 60 | |
| 61 | FILES_lib${BPN} = "${base_libdir}/libpasswdqc.so.0" |
| 62 | FILES_pam-${BPN} = "${base_libdir}/security/pam_passwdqc.so" |
| 63 | FILES_${PN}-dbg += "${base_libdir}/security/.debug" |
| 64 | |
| 65 | RDEPENDS_${PN} = "lib${BPN} pam-${BPN}" |
| 66 | RDEPENDS_pam-${BPN} = "lib${BPN}" |