1 |
commit: d82536728651a74bb9e3db51040aeded8824df89 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 22 13:45:11 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 22 18:57:58 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8253672 |
7 |
|
8 |
kde-plasma/ksshaskpass: Add old script migration, update postinst |
9 |
|
10 |
Follow-up to bdb0f5267d00191069c4bf88b98fe759441a2a2b and |
11 |
77aa9069fe3cc4680c446a3d9ecd2f5f695f171d. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/688366 |
14 |
Package-Manager: Portage-2.3.82, Repoman-2.3.20 |
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
kde-plasma/ksshaskpass/ksshaskpass-5.17.4.ebuild | 50 ++++++++++++++++++------ |
18 |
1 file changed, 39 insertions(+), 11 deletions(-) |
19 |
|
20 |
diff --git a/kde-plasma/ksshaskpass/ksshaskpass-5.17.4.ebuild b/kde-plasma/ksshaskpass/ksshaskpass-5.17.4.ebuild |
21 |
index 4709b97d614..1d96ba90764 100644 |
22 |
--- a/kde-plasma/ksshaskpass/ksshaskpass-5.17.4.ebuild |
23 |
+++ b/kde-plasma/ksshaskpass/ksshaskpass-5.17.4.ebuild |
24 |
@@ -10,20 +10,43 @@ inherit ecm kde.org |
25 |
|
26 |
DESCRIPTION="KDE implementation of ssh-askpass with Kwallet integration" |
27 |
HOMEPAGE="https://cgit.kde.org/ksshaskpass.git" |
28 |
+ |
29 |
LICENSE="GPL-2" # TODO: CHECK |
30 |
SLOT="5" |
31 |
KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
32 |
IUSE="" |
33 |
|
34 |
DEPEND=" |
35 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
36 |
>=kde-frameworks/kcoreaddons-${KFMIN}:5 |
37 |
>=kde-frameworks/ki18n-${KFMIN}:5 |
38 |
>=kde-frameworks/kwallet-${KFMIN}:5 |
39 |
>=kde-frameworks/kwidgetsaddons-${KFMIN}:5 |
40 |
- >=dev-qt/qtwidgets-${QTMIN}:5 |
41 |
" |
42 |
RDEPEND="${DEPEND}" |
43 |
|
44 |
+pkg_setup() { |
45 |
+ ecm_pkg_setup |
46 |
+ |
47 |
+ local srcfile=/etc/plasma/startup/05-ksshaskpass.sh |
48 |
+ local newfile=/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh |
49 |
+ if [[ -f "${EROOT}"${srcfile} ]]; then |
50 |
+ local md5=$(md5sum "${EROOT}"${srcfile}) |
51 |
+ if [[ ${md5%% *} != 615ae8f5b0090ff7f51d0edee7885d55 ]]; then |
52 |
+ elog "Existing modified "${EPREFIX}"${srcfile} detected." |
53 |
+ elog "Copying to "${EPREFIX}"${newfile}..." |
54 |
+ cp -v "${EROOT}"${srcfile} "${T}"/ || die |
55 |
+ fi |
56 |
+ fi |
57 |
+} |
58 |
+ |
59 |
+src_prepare() { |
60 |
+ ecm_src_prepare |
61 |
+ if [[ ! -f "${T}"/05-ksshaskpass.sh ]]; then |
62 |
+ cp "${FILESDIR}"/05-ksshaskpass.sh "${T}"/ || die |
63 |
+ fi |
64 |
+} |
65 |
+ |
66 |
src_install() { |
67 |
ecm_src_install |
68 |
|
69 |
@@ -34,17 +57,22 @@ src_install() { |
70 |
pkg_postinst() { |
71 |
ecm_pkg_postinst |
72 |
|
73 |
+ elog "In order to have ssh-agent start with Plasma 5," |
74 |
+ elog "edit /etc/xdg/plasma-workspace/env/10-agent-startup.sh" |
75 |
+ elog "and uncomment the lines enabling ssh-agent." |
76 |
+ elog |
77 |
+ elog "If you do so, do not forget to uncomment the respective" |
78 |
+ elog "lines in /etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh" |
79 |
+ elog "to properly kill the agent when the session ends." |
80 |
+ elog |
81 |
elog "${PN} has been installed as your default askpass application" |
82 |
elog "for Plasma 5 sessions." |
83 |
elog "If that's not desired, select the one you want to use in" |
84 |
- elog |
85 |
- elog "/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh (ATTN: Path moved!)" |
86 |
- elog |
87 |
- elog "In order to have ssh-agent start with Plasma 5, do the following:" |
88 |
- elog " * Copy the necessary files to your home directory:" |
89 |
- elog " - cp /etc/plasma/startup/10-agent-startup.sh ~/.config/plasma-workspace/env/" |
90 |
- elog " - cp /etc/plasma/shutdown/10-agent-shutdown.sh ~/.config/plasma-workspace/shutdown/" |
91 |
- elog " * Edit 10-agent-startup.sh and uncomment the lines enabling ssh-agent." |
92 |
- elog " * In 10-agent-shutdown.sh uncomment the respective lines to properly kill" |
93 |
- elog " the agent when the session ends." |
94 |
+ elog "/etc/xdg/plasma-workspace/env/05-ksshaskpass.sh" |
95 |
+ |
96 |
+ # Clean up pre-5.17.4 script |
97 |
+ if [[ -e "${EROOT}"/etc/plasma/startup/05-ksshaskpass.sh ]]; then |
98 |
+ rm "${EROOT}"/etc/plasma/startup/05-ksshaskpass.sh || die |
99 |
+ elog "Removed obsolete ${EPREFIX}/etc/plasma/startup/05-ksshaskpass.sh" |
100 |
+ fi |
101 |
} |