blob: 0dc29a2a0bd5f76eab4fbc6d192c5dfed3528ea9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase-startkde/kdebase-startkde-3.5.7-r1.ebuild,v 1.1 2007/12/09 23:11:59 philantrop Exp $
KMNAME=kdebase
KMNOMODULE=true
KMEXTRACTONLY="kdm/kfrontend/sessions/kde.desktop.in startkde"
MAXKDEVER=$PV
KM_DEPRANGE="$PV $MAXKDEVER"
inherit multilib kde-meta eutils
SRC_URI="${SRC_URI}
mirror://gentoo/kdebase-3.5-patchset-08.tar.bz2"
DESCRIPTION="startkde script, which starts a complete KDE session, and associated scripts"
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE=""
# The kde apps called from the startkde script.
# kdesktop, kicker etc are started because they put files in $KDEDIR/share/autostart
# and so in theory they aren't strictly necessary deps.
RDEPEND="x11-apps/xmessage
x11-apps/xsetroot
x11-apps/xset
x11-apps/xrandr
x11-apps/mkfontdir
x11-apps/xprop
$(deprange $PV $MAXKDEVER kde-base/kdesktop)
$(deprange 3.5.6 $MAXKDEVER kde-base/kcminit)
$(deprange $PV $MAXKDEVER kde-base/ksmserver)
$(deprange $PV $MAXKDEVER kde-base/kwin)
$(deprange $PV $MAXKDEVER kde-base/kpersonalizer)
$(deprange 3.5.6 $MAXKDEVER kde-base/kreadconfig)
$(deprange $PV $MAXKDEVER kde-base/ksplashml)"
src_compile() {
# Patch the startkde script to setup the environment for KDE 4.0
# Add our KDEDIR
sed -i -e "s#@REPLACE_PREFIX@#${PREFIX}#" \
"${S}/startkde" || die "Sed for PREFIX failed."
# List all the multilib libdirs
local _libdir _libdirs
for _libdir in $(get_all_libdirs); do
_libdirs="${_libdirs}:${PREFIX}/${_libdir}"
done
_libdirs=${_libdirs#:}
# Complete LDPATH
sed -i -e "s#@REPLACE_LIBS@#${_libdirs}#" \
"${S}/startkde" || die "Sed for LDPATH failed."
}
src_install() {
# startkde script
exeinto "${KDEDIR}/bin"
doexe startkde
# startup and shutdown scripts
insinto "${KDEDIR}/env"
doins "${WORKDIR}/patches/agent-startup.sh"
exeinto "${KDEDIR}/shutdown"
doexe "${WORKDIR}/patches/agent-shutdown.sh"
# freedesktop environment variables
cat <<EOF > "${T}/xdg.sh"
export XDG_CONFIG_DIRS="${KDEDIR}/etc/xdg"
EOF
insinto "${KDEDIR}/env"
doins "${T}/xdg.sh"
# x11 session script
cat <<EOF > "${T}/kde-${SLOT}"
#!/bin/sh
exec ${KDEDIR}/bin/startkde
EOF
exeinto /etc/X11/Sessions
doexe "${T}/kde-${SLOT}"
# freedesktop compliant session script
sed -e "s:@KDE_BINDIR@:${KDEDIR}/bin:g;s:Name=KDE:Name=KDE ${SLOT}:" \
"${S}/kdm/kfrontend/sessions/kde.desktop.in" > "${T}/kde-${SLOT}.desktop"
insinto /usr/share/xsessions
doins "${T}/kde-${SLOT}.desktop"
}
pkg_postinst () {
echo
elog "To enable gpg-agent and/or ssh-agent in KDE sessions,"
elog "edit ${KDEDIR}/env/agent-startup.sh and"
elog "${KDEDIR}/shutdown/agent-shutdown.sh"
echo
}
|