You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.3 KiB
63 lines
1.3 KiB
4 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
4 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=7
|
||
|
|
||
|
inherit pam toolchain-funcs
|
||
|
|
||
|
DESCRIPTION="Password strength checking library (and PAM module)"
|
||
|
HOMEPAGE="http://www.openwall.com/passwdqc/"
|
||
|
SRC_URI="http://www.openwall.com/${PN}/${P}.tar.gz"
|
||
|
|
||
|
LICENSE="Openwall BSD public-domain"
|
||
|
SLOT="0"
|
||
4 years ago
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||
4 years ago
|
|
||
3 years ago
|
RDEPEND="sys-libs/pam
|
||
|
virtual/libcrypt:="
|
||
4 years ago
|
DEPEND="${RDEPEND}"
|
||
|
|
||
4 years ago
|
pkg_setup() {
|
||
|
QA_FLAGS_IGNORED="/$(get_libdir)/security/pam_passwdqc.so
|
||
|
/usr/$(get_libdir)/libpasswdqc.so.0"
|
||
|
}
|
||
|
|
||
4 years ago
|
src_prepare() {
|
||
|
default
|
||
|
sed -i -e 's:`uname -s`:Linux:' Makefile || die
|
||
4 years ago
|
|
||
|
# ship our own default settings
|
||
|
cat <<- EOF > "${S}/passwdqc.conf"
|
||
|
min=8,8,8,8,8
|
||
|
max=40
|
||
|
passphrase=3
|
||
|
match=4
|
||
|
similar=deny
|
||
|
random=47
|
||
|
enforce=everyone
|
||
|
retry=3
|
||
|
EOF
|
||
|
|
||
4 years ago
|
}
|
||
|
|
||
|
_emake() {
|
||
4 years ago
|
emake \
|
||
4 years ago
|
SHARED_LIBDIR="/usr/$(get_libdir)" \
|
||
4 years ago
|
SECUREDIR="$(getpam_mod_dir)" \
|
||
4 years ago
|
CONFDIR="/etc/security" \
|
||
4 years ago
|
CFLAGS="${CFLAGS} ${CPPFLAGS}" \
|
||
|
LDFLAGS="${LDFLAGS}" \
|
||
|
CC="$(tc-getCC)" \
|
||
|
LD="$(tc-getCC)" \
|
||
|
"$@"
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
4 years ago
|
_emake all
|
||
4 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
_emake DESTDIR="${ED}" install_lib install_pam install_utils
|
||
|
dodoc README PLATFORMS INTERNALS
|
||
4 years ago
|
}
|