summaryrefslogtreecommitdiffstats
path: root/trinity-base/tdebase-starttde
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-11-28 02:34:44 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-11-28 02:34:44 +0100
commit644110a847c5911c2eb04eb53c93031740561efc (patch)
tree9658dde1cc70b52b233957b7852f87d997e98156 /trinity-base/tdebase-starttde
downloadtde-packaging-gentoo-644110a847c5911c2eb04eb53c93031740561efc.tar.gz
tde-packaging-gentoo-644110a847c5911c2eb04eb53c93031740561efc.zip
Initial import of an ebuilds tree
from Fat-Zer's (Alexander Golubev) repository. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'trinity-base/tdebase-starttde')
-rw-r--r--trinity-base/tdebase-starttde/files/agent-shutdown.sh13
-rw-r--r--trinity-base/tdebase-starttde/files/agent-startup.sh29
-rw-r--r--trinity-base/tdebase-starttde/files/kdebase-startkde-trinity-gentoo.patch46
l---------trinity-base/tdebase-starttde/files/shared1
-rw-r--r--trinity-base/tdebase-starttde/files/tdebase-starttde-14-gentoo.patch32
-rw-r--r--trinity-base/tdebase-starttde/metadata.xml8
-rw-r--r--trinity-base/tdebase-starttde/tdebase-starttde-9999.ebuild95
7 files changed, 224 insertions, 0 deletions
diff --git a/trinity-base/tdebase-starttde/files/agent-shutdown.sh b/trinity-base/tdebase-starttde/files/agent-shutdown.sh
new file mode 100644
index 00000000..07cf7477
--- /dev/null
+++ b/trinity-base/tdebase-starttde/files/agent-shutdown.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# This file is executed at kde shutdown.
+# Uncomment the following lines to kill the agents
+# that were started at session startup.
+
+#if [ -n "${GPG_AGENT_INFO}" ]; then
+# kill $(echo ${GPG_AGENT_INFO} | cut -d':' -f 2) >/dev/null 2>&1
+#fi
+
+#if [ -n "${SSH_AGENT_PID}" ]; then
+# eval "$(ssh-agent -s -k)"
+#fi
diff --git a/trinity-base/tdebase-starttde/files/agent-startup.sh b/trinity-base/tdebase-starttde/files/agent-startup.sh
new file mode 100644
index 00000000..4b99f6e8
--- /dev/null
+++ b/trinity-base/tdebase-starttde/files/agent-startup.sh
@@ -0,0 +1,29 @@
+# Agents startup file
+#
+# This file is sourced at kde startup, so that
+# the environment variables set here are available
+# throughout the session.
+
+# Uncomment the following lines to start gpg-agent
+# and/or ssh-agent at kde startup.
+# If you do so, do not forget to uncomment the respective
+# lines in KDEDIR/shutdown/agent-shutdown.sh to
+# properly kill the agents when the session ends.
+
+#if [ -x /usr/bin/gpg-agent ]; then
+# eval "$(/usr/bin/gpg-agent --daemon)"
+#fi
+
+#if [ -x /usr/bin/ssh-agent ]; then
+# eval "$(/usr/bin/ssh-agent -s)"
+#fi
+
+# Uncomment the following lines to start rxvt-unicode which has the ability to
+# run multiple terminals in one single process, thus starting up faster and
+# saving resources.
+# The --opendisplay ensures that the daemon quits when the X server terminates,
+# therefore we don't need matching lines in agent-shutdown.sh.
+
+#if [ -x /usr/bin/urxvtd ]; then
+# /usr/bin/urxvtd --opendisplay --fork --quiet
+#fi
diff --git a/trinity-base/tdebase-starttde/files/kdebase-startkde-trinity-gentoo.patch b/trinity-base/tdebase-starttde/files/kdebase-startkde-trinity-gentoo.patch
new file mode 100644
index 00000000..0d37eab5
--- /dev/null
+++ b/trinity-base/tdebase-starttde/files/kdebase-startkde-trinity-gentoo.patch
@@ -0,0 +1,46 @@
+--- startkde.orig 2011-09-19 14:54:22.812972431 +0400
++++ startkde 2011-09-19 15:02:54.050401619 +0400
+@@ -9,6 +9,15 @@
+ # because we still need to do some cleanup.
+ trap '[startkde] echo GOT SIGHUP' HUP
+
++# Gentoo: setup environment, filter other slotted KDE installs from PATH
++_KDEDIR=@REPLACE_PREFIX@
++#export KDEDIRS=${_KDEDIR}:/usr:/usr/local
++export PATH=${_KDEDIR}/bin:$(echo ${PATH} | sed 's/$/:/g;s#/usr/kde/[^/]*/s\?bin/\?:##g;s/:$//g')
++export ROOTPATH=${_KDEDIR}/sbin:${_KDEDIR}/bin:$(echo ${PATH} | sed 's/$/:/g;s#/usr/kde/[^/]*/s\?bin/\?:##g;s/:$//g')
++export LDPATH=@REPLACE_LIBS@:${LDPATH}
++export XDG_DATA_DIRS=${_KDEDIR}/share:$(echo ${XDG_DATA_DIRS} | sed 's/$/:/g;s#/usr/kde/[^/]*/share/\?:##g;s/:$//g')
++# Gentoo part ends
++
+ # Check if a KDE session is already running.
+ if kcheckrunning >/dev/null 2>&1; then
+ echo "[startkde] KDE seems to be already running on this display."
+@@ -340,6 +349,13 @@
+ done
+ done
+
++# Source scripts in /etc/X11/xinit/xinitrc.d/ for system-level defined stuff
++if test -d "/etc/X11/xinit/xinitrc.d/"; then
++ for file in "/etc/X11/xinit/xinitrc.d/"*; do
++ test -x "$file" && . "$file"
++ done
++fi
++
+ # Activate the kde font directories.
+ #
+ # There are 4 directories that may be used for supplying fonts for KDE.
+@@ -593,7 +609,12 @@
+ # Clean up
+ kdeinit_shutdown
+ dcopserver_shutdown --wait
+-artsshell -q terminate
++
++# Terminate artsshell if it exists
++if [ -e ${_KDEDIR}/bin/artsshell ] ; then
++ artsshell -q terminate ;
++fi
++
+ # KDE4 support
+ if [ -f /usr/bin/kdeinit4_shutdown ]; then
+ kde4 kdeinit4_shutdown 2>/dev/null
diff --git a/trinity-base/tdebase-starttde/files/shared b/trinity-base/tdebase-starttde/files/shared
new file mode 120000
index 00000000..ffc28680
--- /dev/null
+++ b/trinity-base/tdebase-starttde/files/shared
@@ -0,0 +1 @@
+../../../eclass/trinity-shared-files \ No newline at end of file
diff --git a/trinity-base/tdebase-starttde/files/tdebase-starttde-14-gentoo.patch b/trinity-base/tdebase-starttde/files/tdebase-starttde-14-gentoo.patch
new file mode 100644
index 00000000..8d91f88c
--- /dev/null
+++ b/trinity-base/tdebase-starttde/files/tdebase-starttde-14-gentoo.patch
@@ -0,0 +1,32 @@
+--- starttde 2019-01-27 13:01:05.443907841 +0300
++++ starttde.gentoo 2019-01-27 13:01:48.203621371 +0300
+@@ -178,7 +178,7 @@
+
+ # Modify the following environment variables only as necessary.
+
+- if ! is_in_path PATH "$TDEDIR/games" ; then
++# if ! is_in_path PATH "$TDEDIR/games" ; then
+ # Respect the traditional path order. Don't blindly place $TDEDIR/games
+ # first in the path. Only place $TDEDIR/games before /usr/games. If packagers
+ # are adding $TDEDIR/games elsewhere, then they need to ensure the traditional
+@@ -190,9 +190,9 @@
+ else
+ export PATH=$TDEDIR/games:$PATH
+ fi
+- fi
++# fi
+
+- if ! is_in_path PATH "$TDEDIR/bin" ]; then
++# if ! is_in_path PATH "$TDEDIR/bin" ]; then
+ # Respect the traditional path order. Don't blindly place $TDEDIR/bin
+ # first in the path. Only place $TDEDIR/bin before /usr/bin. This order is
+ # consistent with tdelibs/tdesu/stub.cpp. If packagers are adding $TDEDIR/bin
+@@ -204,7 +204,7 @@
+ else
+ export PATH=$TDEDIR/bin:$PATH
+ fi
+- fi
++# fi
+
+ if [ -x /usr/bin/manpath ]; then
+ if [ "`manpath 2>/dev/null | grep \"$TDEDIR/share/man\"`" = "" ]; then
diff --git a/trinity-base/tdebase-starttde/metadata.xml b/trinity-base/tdebase-starttde/metadata.xml
new file mode 100644
index 00000000..6e9f5e4a
--- /dev/null
+++ b/trinity-base/tdebase-starttde/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>fatzer2@gmail.com</email>
+ <name>Alexander Golubev</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/trinity-base/tdebase-starttde/tdebase-starttde-9999.ebuild b/trinity-base/tdebase-starttde/tdebase-starttde-9999.ebuild
new file mode 100644
index 00000000..f3b8d3f1
--- /dev/null
+++ b/trinity-base/tdebase-starttde/tdebase-starttde-9999.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI="5"
+TRINITY_MODULE_NAME="tdebase"
+
+inherit trinity-meta
+
+DESCRIPTION="starttde script, which starts a complete Trinity session, and associated scripts"
+KEYWORDS=
+IUSE=""
+
+RDEPEND="x11-apps/xmessage
+ x11-apps/xsetroot
+ x11-apps/xset
+ x11-apps/xrandr
+ x11-apps/mkfontdir
+ x11-apps/xprop
+ >=trinity-base/kdesktop-${PV}:${SLOT}
+ >=trinity-base/kcminit-${PV}:${SLOT}
+ >=trinity-base/ksmserver-${PV}:${SLOT}
+ >=trinity-base/twin-${PV}:${SLOT}
+ >=trinity-base/kpersonalizer-${PV}:${SLOT}
+ >=trinity-base/kreadconfig-${PV}:${SLOT}
+ >=trinity-base/ksplashml-${PV}:${SLOT}
+ >=trinity-base/tdeinit-${PV}:${SLOT}"
+
+TSM_EXTRACT="starttde README.pam INSTALL AUTHORS COPYING COPYING-DOCS tdm"
+
+PATCHES=( "$FILESDIR/${PN}-14-gentoo.patch")
+
+src_prepare() {
+# epatch "${FILESDIR}/tdebase-starttde-trinity-gentoo.patch"
+
+ trinity-base_src_prepare
+}
+
+src_configure() {
+ echo -n "";
+}
+
+src_compile() {
+ # Patch the starttde script to setup the environment for KDE 4.0
+ # Add our TDEDIR
+ sed -i -e "s#@REPLACE_PREFIX@#${TDEDIR}#" \
+ "${S}/starttde" || 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}/starttde" || die "Sed for LDPATH failed."
+}
+
+src_install() {
+ # starttde script
+ exeinto "${TDEDIR}/bin"
+ doexe starttde
+ doexe r14-xdg-update
+ doexe migratekde3
+
+ # startup and shutdown scripts
+ exeinto "${TDEDIR}/env"
+ doexe "${FILESDIR}/agent-startup.sh"
+
+ exeinto "${TDEDIR}/shutdown"
+ doexe "${FILESDIR}/agent-shutdown.sh"
+
+ # x11 session script
+ cat <<EOF > "${T}/tde-${SLOT}"
+#!/bin/sh
+exec ${TDEDIR}/bin/starttde
+EOF
+ exeinto /etc/X11/Sessions
+ doexe "${T}/tde-${SLOT}" # FIXME: change script branding to trinity
+
+ # (not really) freedesktop compliant session script
+ sed -e "s:@TDE_BINDIR@:${TDEDIR}/bin:g;s:Name=Trinity:Name=Trinity ${SLOT}:" \
+ "${S}/tdm/kfrontend/sessions/tde.desktop.in" > "${T}/tde-${SLOT}.desktop"
+ insinto /usr/share/xsessions
+ doins "${T}/tde-${SLOT}.desktop"
+}
+
+pkg_postinst () {
+ echo
+ elog "To enable gpg-agent and/or ssh-agent in Trinity sessions,"
+ elog "edit ${TDEDIR}/env/agent-startup.sh and"
+ elog "${TDEDIR}/shutdown/agent-shutdown.sh"
+ echo
+}