summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2012-07-10 04:14:43 +0000
committerDoug Goldstein <cardoe@gentoo.org>2012-07-10 04:14:43 +0000
commit647cdf0586ce13c41a9b98adb860bbc7c7c6415f (patch)
tree0aaa0a6703b3008d641f849852b7c63edc6fcadb /media-tv
parentFix pod encoding (#425282) (diff)
downloadgentoo-2-647cdf0586ce13c41a9b98adb860bbc7c7c6415f.tar.gz
gentoo-2-647cdf0586ce13c41a9b98adb860bbc7c7c6415f.tar.bz2
gentoo-2-647cdf0586ce13c41a9b98adb860bbc7c7c6415f.zip
Add a Mythbuntu like wrapper for mythfrontend so users can configure the autostart arguments easily as well as using mythwelcome as a wrapper.
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/mythtv/ChangeLog8
-rw-r--r--media-tv/mythtv/files/mythfrontend.conf13
-rw-r--r--media-tv/mythtv/files/mythfrontend.wrapper29
-rw-r--r--media-tv/mythtv/files/xinitrc-r18
-rw-r--r--media-tv/mythtv/mythtv-0.25.1_p20120708.ebuild9
5 files changed, 63 insertions, 4 deletions
diff --git a/media-tv/mythtv/ChangeLog b/media-tv/mythtv/ChangeLog
index 290359291e41..50a4a9136dce 100644
--- a/media-tv/mythtv/ChangeLog
+++ b/media-tv/mythtv/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-tv/mythtv
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/ChangeLog,v 1.357 2012/07/09 14:48:47 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/ChangeLog,v 1.358 2012/07/10 04:14:43 cardoe Exp $
+
+ 09 Jul 2012; Doug Goldstein <cardoe@gentoo.org>
+ mythtv-0.25.1_p20120708.ebuild, +files/mythfrontend.conf,
+ +files/mythfrontend.wrapper, +files/xinitrc-r1:
+ Add a Mythbuntu like wrapper for mythfrontend so users can configure the
+ autostart arguments easily as well as using mythwelcome as a wrapper.
09 Jul 2012; Doug Goldstein <cardoe@gentoo.org>
mythtv-0.25.1_p20120708.ebuild:
diff --git a/media-tv/mythtv/files/mythfrontend.conf b/media-tv/mythtv/files/mythfrontend.conf
new file mode 100644
index 000000000000..bb6baf646aa8
--- /dev/null
+++ b/media-tv/mythtv/files/mythfrontend.conf
@@ -0,0 +1,13 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/files/mythfrontend.conf,v 1.1 2012/07/10 04:14:43 cardoe Exp $
+
+# Should 'mythfrontend' really execute mythwelcome instead?
+# Default: false
+MYTHWELCOME=false
+
+# Options to pass to mythfrontend or mythwelcome based on the above setting
+# Note: If you have mythwelcome enabled, it does not pass arguments to
+# mythfrontend. You must configure this inside mythwelcome
+# Default: --syslog local7
+MYTHFRONTEND_OPTS="--syslog local7"
diff --git a/media-tv/mythtv/files/mythfrontend.wrapper b/media-tv/mythtv/files/mythfrontend.wrapper
new file mode 100644
index 000000000000..85052a45cda2
--- /dev/null
+++ b/media-tv/mythtv/files/mythfrontend.wrapper
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Based on Mythbuntu's script
+
+# Check if the frontend is already running,
+# if it is bring it to the foreground.
+# This is to prevent multiple frontends from running
+/usr/bin/pgrep mythfrontend.real 2>&1 > /dev/null && \
+ /usr/bin/wmctrl -a "MythTV Frontend" 2> /dev/null && \
+ exit 0
+
+# Check if you're part of the video group
+if [ -n "$(groups | grep -v video)" ]; then
+ echo "'$USER' is not part of the 'video' group." >&2
+ echo "For best results add '$USER' to the 'video' group." >&2
+fi
+
+if [ -e /etc/conf.d/mythfrontend ]; then
+ . /etc/conf.d/mythfrontend
+fi
+
+if [ "x${MYTHWELCOME}" = "xtrue" ]; then
+ exec /usr/bin/mythwelcome ${MYTHFRONTEND_OPTS}
+ RET=$?
+else
+ exec /usr/bin/mythfrontend.real ${MYTHFRONTEND_OPTS}
+ RET=$?
+fi
+
+exit ${RET}
diff --git a/media-tv/mythtv/files/xinitrc-r1 b/media-tv/mythtv/files/xinitrc-r1
new file mode 100644
index 000000000000..c366fe487a84
--- /dev/null
+++ b/media-tv/mythtv/files/xinitrc-r1
@@ -0,0 +1,8 @@
+# .xinitrc
+[ -x /usr/bin/nvidia-settings ] && /usr/bin/nvidia-settings -l
+/usr/bin/xset s noblank
+/usr/bin/xset s off
+/usr/bin/xset -dpms
+/usr/bin/evilwm &
+# Configure arguments via /etc/conf.d/mythfrontend
+exec /usr/bin/mythfrontend
diff --git a/media-tv/mythtv/mythtv-0.25.1_p20120708.ebuild b/media-tv/mythtv/mythtv-0.25.1_p20120708.ebuild
index a9f1ed0ff7d1..d272645af08c 100644
--- a/media-tv/mythtv/mythtv-0.25.1_p20120708.ebuild
+++ b/media-tv/mythtv/mythtv-0.25.1_p20120708.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/mythtv-0.25.1_p20120708.ebuild,v 1.3 2012/07/09 14:48:47 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/mythtv-0.25.1_p20120708.ebuild,v 1.4 2012/07/10 04:14:43 cardoe Exp $
EAPI=4
@@ -218,7 +218,10 @@ src_install() {
insinto /usr/share/mythtv/contrib
doins -r contrib/*
- newbin "${FILESDIR}"/runmythfe-r1 runmythfe
+ # Install our mythfrontend wrapper which is similar to Mythbuntu's
+ mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real"
+ newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
+ newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
if use autostart; then
dodir /etc/env.d/
@@ -226,7 +229,7 @@ src_install() {
insinto /home/mythtv
newins "${FILESDIR}"/bash_profile .bash_profile
- newins "${FILESDIR}"/xinitrc .xinitrc
+ newins "${FILESDIR}"/xinitrc-r1 .xinitrc
fi
for file in `find "${ED}" -type f -name \*.py`; do chmod a+x "${file}"; done