1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 inherit kde5 multibuild multilib
10 DESCRIPTION="KWallet PAM module to not enter password again"
12 KEYWORDS="~amd64 ~arm ~x86"
19 DEPEND="${COMMON_DEPEND}
20 $(add_frameworks_dep extra-cmake-modules)
23 RDEPEND="${COMMON_DEPEND}
24 !kde-apps/kwalletd-pam
30 MULTIBUILD_VARIANTS=( kf5 $(usev oldwallet) )
36 -DCMAKE_INSTALL_LIBDIR="/$(get_libdir)"
38 [[ ${MULTIBUILD_VARIANT} = oldwallet ]] && mycmakeargs+=( -DKWALLET4=1 )
42 multibuild_foreach_variant myconfigure
46 multibuild_foreach_variant kde5_src_compile
50 multibuild_foreach_variant kde5_src_install
56 if [[ -e "${ROOT}${2}" ]] ; then
57 if grep -Eq "auth\s+optional\s+pam_kwallet5.so" "${ROOT}${2}" && \
58 grep -Eq "session\s+optional\s+pam_kwallet5.so" "${ROOT}${2}" ; then
61 if use oldwallet ; then
62 if ! grep -Eq "auth\s+optional\s+pam_kwallet.so" "${ROOT}${2}" || \
63 ! grep -Eq "session\s+optional\s+pam_kwallet.so" "${ROOT}${2}" ; then
68 [[ "${good}" = true ]] && \
69 elog " ${1} - ${2} ...GOOD" || \
70 ewarn " ${1} - ${2} ...BAD"
73 elog "This package enables auto-unlocking of kde-frameworks/kwallet:5."
74 use oldwallet && elog "You have also selected support for legacy kde-apps/kwalletd:4."
75 elog "List of things to make it work:"
76 elog "1. Use standard blowfish encryption instead of GPG"
77 elog "2. Use same password for login and kwallet"
78 elog "3. A display manager with support for PAM"
79 elog "4.a Have the following lines in the display manager's pam.d file:"
80 elog " -auth optional pam_kwallet5.so"
81 elog " -session optional pam_kwallet5.so auto_start"
82 if use oldwallet ; then
83 elog " -auth optional pam_kwallet.so kdehome=.kde4"
84 elog " -session optional pam_kwallet.so"
86 elog "4.b Checking installed DMs..."
87 has_version "x11-misc/sddm" && check_dm "SDDM" "/etc/pam.d/sddm"
88 has_version "x11-misc/lightdm" && check_dm "LightDM" "/etc/pam.d/lightdm"
89 has_version "kde-base/kdm" && check_dm "KDM" "/etc/pam.d/kde"