1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
11 DESCRIPTION="KDE implementation of ssh-askpass with Kwallet integration"
12 HOMEPAGE="https://cgit.kde.org/ksshaskpass.git"
14 LICENSE="GPL-2" # TODO: CHECK
16 KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~x86"
20 >=dev-qt/qtwidgets-${QTMIN}:5
21 >=kde-frameworks/kcoreaddons-${KFMIN}:5
22 >=kde-frameworks/ki18n-${KFMIN}:5
23 >=kde-frameworks/kwallet-${KFMIN}:5
24 >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
31 local srcfile=/etc/plasma/startup/05-ksshaskpass.sh
32 local newfile=/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh
33 if [[ -f "${EROOT}"${srcfile} ]]; then
34 local md5=$(md5sum "${EROOT}"${srcfile})
35 if [[ ${md5%% *} != 615ae8f5b0090ff7f51d0edee7885d55 ]]; then
36 elog "Existing modified "${EPREFIX}"${srcfile} detected."
37 elog "Copying to "${EPREFIX}"${newfile}..."
38 cp -v "${EROOT}"${srcfile} "${T}"/ || die
45 if [[ ! -f "${T}"/05-ksshaskpass.sh ]]; then
46 cp "${FILESDIR}"/05-ksshaskpass.sh "${T}"/ || die
53 insinto /etc/xdg/plasma-workspace/env/
54 doins "${FILESDIR}/05-ksshaskpass.sh"
60 elog "In order to have ssh-agent start with Plasma 5,"
61 elog "edit /etc/xdg/plasma-workspace/env/10-agent-startup.sh"
62 elog "and uncomment the lines enabling ssh-agent."
64 elog "If you do so, do not forget to uncomment the respective"
65 elog "lines in /etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh"
66 elog "to properly kill the agent when the session ends."
68 elog "${PN} has been installed as your default askpass application"
69 elog "for Plasma 5 sessions."
70 elog "If that's not desired, select the one you want to use in"
71 elog "/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh"
73 # Clean up pre-5.17.4 script
74 if [[ -e "${EROOT}"/etc/plasma/startup/05-ksshaskpass.sh ]]; then
75 rm "${EROOT}"/etc/plasma/startup/05-ksshaskpass.sh || die
76 elog "Removed obsolete ${EPREFIX}/etc/plasma/startup/05-ksshaskpass.sh"