1 |
commit: c956632e0b0b798755fb4a331bf1232540c627c0 |
2 |
Author: Johannes Huber <johu <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 28 14:42:16 2014 +0000 |
4 |
Commit: Johannes Huber <johu <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 28 14:42:16 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=c956632e |
7 |
|
8 |
[kde-base/plasma-workspace] Enable startup/shutdown script support |
9 |
|
10 |
Package-Manager: portage-2.2.10 |
11 |
|
12 |
--- |
13 |
kde-base/plasma-workspace/files/agent-shutdown.sh | 13 +++++++ |
14 |
kde-base/plasma-workspace/files/agent-startup.sh | 29 ++++++++++++++++ |
15 |
.../files/plasma-workspace-startkde-script.patch | 40 ++++++++++++++++++++++ |
16 |
.../plasma-workspace/plasma-workspace-9999.ebuild | 26 ++++++++++++-- |
17 |
4 files changed, 105 insertions(+), 3 deletions(-) |
18 |
|
19 |
diff --git a/kde-base/plasma-workspace/files/agent-shutdown.sh b/kde-base/plasma-workspace/files/agent-shutdown.sh |
20 |
new file mode 100644 |
21 |
index 0000000..fff8056 |
22 |
--- /dev/null |
23 |
+++ b/kde-base/plasma-workspace/files/agent-shutdown.sh |
24 |
@@ -0,0 +1,13 @@ |
25 |
+#!/bin/sh |
26 |
+# |
27 |
+# This file is executed at plasma shutdown. |
28 |
+# Uncomment the following lines to kill the agents |
29 |
+# that were started at session startup. |
30 |
+ |
31 |
+#if [ -n "${GPG_AGENT_INFO}" ]; then |
32 |
+# kill $(echo ${GPG_AGENT_INFO} | cut -d':' -f 2) >/dev/null 2>&1 |
33 |
+#fi |
34 |
+ |
35 |
+#if [ -n "${SSH_AGENT_PID}" ]; then |
36 |
+# eval "$(ssh-agent -s -k)" |
37 |
+#fi |
38 |
|
39 |
diff --git a/kde-base/plasma-workspace/files/agent-startup.sh b/kde-base/plasma-workspace/files/agent-startup.sh |
40 |
new file mode 100644 |
41 |
index 0000000..03e017a |
42 |
--- /dev/null |
43 |
+++ b/kde-base/plasma-workspace/files/agent-startup.sh |
44 |
@@ -0,0 +1,29 @@ |
45 |
+# Agents startup file |
46 |
+# |
47 |
+# This file is sourced at plasma startup, so that |
48 |
+# the environment variables set here are available |
49 |
+# throughout the session. |
50 |
+ |
51 |
+# Uncomment the following lines to start gpg-agent |
52 |
+# and/or ssh-agent at plasma startup. |
53 |
+# If you do so, do not forget to uncomment the respective |
54 |
+# lines in PLASMADIR/shutdown/agent-shutdown.sh to |
55 |
+# properly kill the agents when the session ends. |
56 |
+ |
57 |
+#if [ -x /usr/bin/gpg-agent ]; then |
58 |
+# eval "$(/usr/bin/gpg-agent --daemon)" |
59 |
+#fi |
60 |
+ |
61 |
+#if [ -x /usr/bin/ssh-agent ]; then |
62 |
+# eval "$(/usr/bin/ssh-agent -s)" |
63 |
+#fi |
64 |
+ |
65 |
+# Uncomment the following lines to start rxvt-unicode which has the ability to |
66 |
+# run multiple terminals in one single process, thus starting up faster and |
67 |
+# saving resources. |
68 |
+# The --opendisplay ensures that the daemon quits when the X server terminates, |
69 |
+# therefore we don't need matching lines in agent-shutdown.sh. |
70 |
+ |
71 |
+#if [ -x /usr/bin/urxvtd ]; then |
72 |
+# /usr/bin/urxvtd --opendisplay --fork --quiet |
73 |
+#fi |
74 |
|
75 |
diff --git a/kde-base/plasma-workspace/files/plasma-workspace-startkde-script.patch b/kde-base/plasma-workspace/files/plasma-workspace-startkde-script.patch |
76 |
new file mode 100644 |
77 |
index 0000000..8fb3756 |
78 |
--- /dev/null |
79 |
+++ b/kde-base/plasma-workspace/files/plasma-workspace-startkde-script.patch |
80 |
@@ -0,0 +1,40 @@ |
81 |
+From 6c3f73efc0619020a0c17219b1f7e1e3cd49478f Mon Sep 17 00:00:00 2001 |
82 |
+From: Johannes Huber <johu@g.o> |
83 |
+Date: Wed, 28 May 2014 16:00:41 +0200 |
84 |
+Subject: [PATCH] [startkde] Gentoo FHS script support |
85 |
+ |
86 |
+--- |
87 |
+ startkde/startkde.cmake | 10 ++++++++++ |
88 |
+ 1 file changed, 10 insertions(+) |
89 |
+ |
90 |
+diff --git a/startkde/startkde.cmake b/startkde/startkde.cmake |
91 |
+index f073b93..1c41364 100644 |
92 |
+--- a/startkde/startkde.cmake |
93 |
++++ b/startkde/startkde.cmake |
94 |
+@@ -206,6 +206,11 @@ for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/env/,p'`; do |
95 |
+ done |
96 |
+ done |
97 |
+ |
98 |
++# Gentoo part for FHS installs |
99 |
++for file in "@GENTOO_PORTAGE_EPREFIX@/etc/plasma/startup/"*.sh; do |
100 |
++ test -r "${file}" && . "${file}" |
101 |
++done |
102 |
++ |
103 |
+ # Set the path for Qt plugins provided by KDE |
104 |
+ QT_PLUGIN_PATH=${QT_PLUGIN_PATH+$QT_PLUGIN_PATH:}`qtpaths --plugin-dir` |
105 |
+ # TODO: Do we really need this? |
106 |
+@@ -411,6 +416,11 @@ for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/shutdown/,p'`; do |
107 |
+ done |
108 |
+ done |
109 |
+ |
110 |
++# Gentoo part for FHS installs |
111 |
++for file in "@GENTOO_PORTAGE_EPREFIX@/etc/plasma/shutdown/"*.sh; do |
112 |
++ test -r "${file}" && . "${file}" |
113 |
++done |
114 |
++ |
115 |
+ unset KDE_FULL_SESSION |
116 |
+ xprop -root -remove KDE_FULL_SESSION |
117 |
+ unset KDE_SESSION_VERSION |
118 |
+-- |
119 |
+1.9.3 |
120 |
+ |
121 |
|
122 |
diff --git a/kde-base/plasma-workspace/plasma-workspace-9999.ebuild b/kde-base/plasma-workspace/plasma-workspace-9999.ebuild |
123 |
index 2bc9036..9aa7ed8 100644 |
124 |
--- a/kde-base/plasma-workspace/plasma-workspace-9999.ebuild |
125 |
+++ b/kde-base/plasma-workspace/plasma-workspace-9999.ebuild |
126 |
@@ -93,7 +93,10 @@ DEPEND="${COMMON_DEPEND} |
127 |
X? ( x11-proto/xproto ) |
128 |
" |
129 |
|
130 |
-PATCHES=( "${FILESDIR}/${P}-cmake-enable-prison.patch" ) |
131 |
+PATCHES=( |
132 |
+ "${FILESDIR}/${PN}-startkde-script.patch" |
133 |
+ "${FILESDIR}/${P}-cmake-enable-prison.patch" |
134 |
+) |
135 |
|
136 |
src_configure() { |
137 |
local mycmakeargs=( |
138 |
@@ -108,8 +111,25 @@ src_configure() { |
139 |
src_install() { |
140 |
kde5_src_install |
141 |
|
142 |
+ # startup and shutdown scripts |
143 |
+ insinto /etc/plasma/startup |
144 |
+ doins "${FILESDIR}/agent-startup.sh" |
145 |
+ |
146 |
+ insinto /etc/plasma/shutdown |
147 |
+ doins "${FILESDIR}/agent-shutdown.sh" |
148 |
+ |
149 |
# x11 session script |
150 |
- echo startkde > "${T}"/KDE-5 |
151 |
+ echo startkde > "${T}"/Plasma |
152 |
exeinto /etc/X11/Sessions |
153 |
- doexe "${T}"/KDE-5 |
154 |
+ doexe "${T}"/Plasma |
155 |
+} |
156 |
+ |
157 |
+pkg_postinst () { |
158 |
+ kde5_pkg_postinst |
159 |
+ |
160 |
+ echo |
161 |
+ elog "To enable gpg-agent and/or ssh-agent in Plasma sessions," |
162 |
+ elog "edit ${EPREFIX}/etc/plasma/startup/agent-startup.sh and" |
163 |
+ elog "${EPREFIX}/etc/plasma/shutdown/agent-shutdown.sh" |
164 |
+ echo |
165 |
} |