summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2010-08-24 14:03:15 +0000
committerMichael Weber <xmw@gentoo.org>2010-08-24 14:03:15 +0000
commit32640b576905ec720c38c1e93aa0a75f289f68db (patch)
tree4be21293e09ad8b424b437c3f88730a3f663ff69 /sys-power/phctool
parentBlock compilation against older boost, bug #334259. (diff)
downloadhistorical-32640b576905ec720c38c1e93aa0a75f289f68db.tar.gz
historical-32640b576905ec720c38c1e93aa0a75f289f68db.tar.bz2
historical-32640b576905ec720c38c1e93aa0a75f289f68db.zip
Initial import for phctool
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'sys-power/phctool')
-rw-r--r--sys-power/phctool/ChangeLog18
-rw-r--r--sys-power/phctool/Manifest7
-rw-r--r--sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch17
-rw-r--r--sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch18
-rw-r--r--sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch32
-rw-r--r--sys-power/phctool/metadata.xml12
-rw-r--r--sys-power/phctool/phctool-0.5.2.2.ebuild78
7 files changed, 182 insertions, 0 deletions
diff --git a/sys-power/phctool/ChangeLog b/sys-power/phctool/ChangeLog
new file mode 100644
index 000000000000..9d55ff2505d4
--- /dev/null
+++ b/sys-power/phctool/ChangeLog
@@ -0,0 +1,18 @@
+# ChangeLog for sys-power/phctool
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/phctool/ChangeLog,v 1.1 2010/08/24 14:03:15 xmw Exp $
+
+ 24 Aug 2010; Michael Weber (xmw) <xmw@gentoo.org> +phctool-0.5.2.2.ebuild,
+ +files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch,
+ +files/phctool-0.5.2.2_all_paths_tool_sudo.patch,
+ +files/phctool-0.5.2.2_all_paths_tray.patch, +metadata.xml:
+ Initial commit for phctool. Fixes bug 283472.
+
+*phctool-0.5.2.2 (24 Aug 2010)
+
+ 24 Aug 2010; Michael Weber (xmw) <xmw@gentoo.org> +phctool-0.5.2.2.ebuild,
+ +files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch,
+ +files/phctool-0.5.2.2_all_paths_tool_sudo.patch,
+ +files/phctool-0.5.2.2_all_paths_tray.patch, +metadata.xml:
+ Initial commit for phctool. Fixes bug 283472.
+
diff --git a/sys-power/phctool/Manifest b/sys-power/phctool/Manifest
new file mode 100644
index 000000000000..b161403a39e2
--- /dev/null
+++ b/sys-power/phctool/Manifest
@@ -0,0 +1,7 @@
+AUX phctool-0.5.2.2_all_paths_tool_no_sudo.patch 530 RMD160 8474572b7b0392bfff4e2ce16d5a2400ed8e3866 SHA1 b5d68d9e8ec03686f8e34171976dada2ad02a4eb SHA256 9776704c00d5733b94a73c57a9755ba747958fc0551fecc6d5fb79627a93eb77
+AUX phctool-0.5.2.2_all_paths_tool_sudo.patch 543 RMD160 00050722ee5bf3642f5291d05c1d994cdc9dde47 SHA1 36297990d40abbfff73b512f54d687c562d31fbf SHA256 15bf6e039b12414058be70569cd6a6d9519b55e569805bd1ad7c6d2ee3d0b7b5
+AUX phctool-0.5.2.2_all_paths_tray.patch 1031 RMD160 c785823cc3eed3dad3c8b762e2a8b21bed9c4099 SHA1 d4da8505a73733a03286eeeeceac6ef475306ba4 SHA256 abddf36fd0cdd6e9b00392a4dadfb1853528edeb39afdeaba6b00d568e2598ac
+DIST phctool-0.5.2.2.tar.gz 941587 RMD160 3b4b496428fcb1951f5510ee7b4435f7725dc24a SHA1 8f0f2b6dd8023746a308cc2a7cab8a22a8e1ebab SHA256 ef60b13a74e7a123008a93d02759e99537a58c40091774a7e70e3e1d5960fa4a
+EBUILD phctool-0.5.2.2.ebuild 1941 RMD160 cabd7508e95c3f9c2b721e748ee6d938dbade277 SHA1 33d624fdc5c7ee5cda526c484f385a4135d77301 SHA256 36ba43e64dbd930409da75bad626c1e84968c70fa2b39410500a9bb8d88e5043
+MISC ChangeLog 826 RMD160 8abd1f862c8ee5b9389ce79b798a967b6c2fb946 SHA1 3a01961d32a9a8b62572e4efff0022fb8a380e7a SHA256 25a425d0e0c967bc128d458f7b77e0c6c1ca2beb9234bd9a923d308a5140250b
+MISC metadata.xml 337 RMD160 c895fcd3e2cdff369aa75757d98445e9f0b4b42d SHA1 d038f24a7bb63728bcb40ba0740b9b1a454c2093 SHA256 575b64bf1704e69d1dd2390bd73238ab232278a70e9d18dd631f79d22dbf5428
diff --git a/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch
new file mode 100644
index 000000000000..2c4de7d32b6a
--- /dev/null
+++ b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_no_sudo.patch
@@ -0,0 +1,17 @@
+--- phctool.sh 2007-10-27 22:32:35.000000000 +0200
++++ phctool.sh 2009-09-05 23:20:18.000000000 +0200
+@@ -1,10 +1,7 @@
+ #!/bin/sh
+-#this shellscript is just a wrapper to subphctool.sh
+-#but necessary to run phctool with sudo even from the tray icon
+-PROGPATH=`dirname "$0"`
+-cd $PROGPATH
+-if test -e /usr/bin/gksu
+- then gksu ./subphctool.sh $1
+- else sudo ./subphctool.sh $1
+-fi
++#this shellscript is just a wrapper to phctool.py
++#but necessary to run phctool from another directory
++
++cd /usr/share/phctool
++./phctool.py $1
diff --git a/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch
new file mode 100644
index 000000000000..3ec8a9172403
--- /dev/null
+++ b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tool_sudo.patch
@@ -0,0 +1,18 @@
+--- phctool.sh 2007-10-27 22:32:35.000000000 +0200
++++ phctool.sh 2009-09-05 23:20:18.000000000 +0200
+@@ -1,10 +1,7 @@
+ #!/bin/sh
+-#this shellscript is just a wrapper to subphctool.sh
+-#but necessary to run phctool with sudo even from the tray icon
+-PROGPATH=`dirname "$0"`
+-cd $PROGPATH
+-if test -e /usr/bin/gksu
+- then gksu ./subphctool.sh $1
+- else sudo ./subphctool.sh $1
+-fi
++#this shellscript is just a wrapper to subphctool.py
++#but necessary to run phctool from another directory
++
++cd /usr/share/phctool
++sudo ./subphctool.sh $1
+
diff --git a/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch
new file mode 100644
index 000000000000..992ed5c7ef15
--- /dev/null
+++ b/sys-power/phctool/files/phctool-0.5.2.2_all_paths_tray.patch
@@ -0,0 +1,32 @@
+--- phctray.sh 2007-09-08 08:29:31.000000000 +0200
++++ phctray.sh 2009-09-05 23:16:54.000000000 +0200
+@@ -2,6 +2,5 @@
+ #this shellscript is just a wrapper to phctray.py
+ #but necessary to run phctray from another directory
+
+-PROGPATH=`dirname "$0"`
+-cd $PROGPATH
++cd /usr/share/phctool
+ ./phctray.py
+--- phctray.py 2009-09-08 12:17:11.000000000 +0200
++++ phctray.py 2009-09-08 12:17:33.000000000 +0200
+@@ -61,7 +61,7 @@
+ t.show_all()
+
+ ##call phctool without GUI to set stored values
+-cmd=[sys.path[0]+"/phctool.sh","background"] ##command
++cmd=["/usr/bin/phctool","background"] ##command
+ subprocess.Popen(cmd, shell=False) ##call the affinated programm
+
+ gtk.main()
+--- phctray.py 2009-09-08 12:22:28.000000000 +0200
++++ phctray.py 2009-09-08 12:23:44.000000000 +0200
+@@ -11,7 +11,7 @@
+ return;
+
+ def run_phctool( *args ):
+- cmd=[sys.path[0]+"/phctool.sh"] ##command
++ cmd=["/usr/bin/phctool"] ##command
+ subprocess.Popen(cmd, shell=False) ##call the affinated programm
+
+ def applet_face_click( window, event, *data ):
diff --git a/sys-power/phctool/metadata.xml b/sys-power/phctool/metadata.xml
new file mode 100644
index 000000000000..21d0c9ac17f3
--- /dev/null
+++ b/sys-power/phctool/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd></herd>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber (xmw)</name>
+</maintainer>
+<use>
+ <flag name="sudo">Enable support for sudo to run gui from non-root user</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-power/phctool/phctool-0.5.2.2.ebuild b/sys-power/phctool/phctool-0.5.2.2.ebuild
new file mode 100644
index 000000000000..5e7f0e12d3e9
--- /dev/null
+++ b/sys-power/phctool/phctool-0.5.2.2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/phctool/phctool-0.5.2.2.ebuild,v 1.1 2010/08/24 14:03:15 xmw Exp $
+
+EAPI=2
+
+PYTHON_DEPEND="2"
+inherit eutils python
+
+DESCRIPTION="Processor Hardware Control userland configuration tool"
+HOMEPAGE="http://www.linux-phc.org/"
+SRC_URI="http://www.linux-phc.org/forum/download/file.php?id=50 -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc sudo"
+
+RDEPEND="dev-python/egg-python
+ dev-python/pygtk:2
+ sudo? ( app-admin/sudo )"
+
+S="${WORKDIR}/${PV%.*}-${PV##*.}/${PN}"
+
+pkg_setup() {
+ MY_PROGDIR="/usr/share/${PN}"
+ if use sudo ; then
+ MY_GROUPNAME="phcusers"
+ enewgroup ${MY_GROUPNAME} || die
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PF}_all_paths_tray.patch"
+ if use sudo; then
+ epatch "${FILESDIR}/${PF}_all_paths_tool_sudo.patch"
+ else
+ epatch "${FILESDIR}/${PF}_all_paths_tool_no_sudo.patch"
+ fi
+ find . -name "*.pyc" -exec rm {} +
+}
+
+src_install() {
+ newbin phctool.sh phctool || die
+ newbin phctray.sh phctray || die
+
+ exeinto ${MY_PROGDIR}
+ doexe phc{tool,tray}.py subphctool.sh || die
+ insinto ${MY_PROGDIR}
+ doins -r inc || die
+
+ if use sudo ; then
+ fowners -R :${MY_GROUPNAME} "${MY_PROGDIR}" || die
+ fperms g+rX "${MY_PROGDIR}" || die
+ fi
+
+ dodoc CHANGELOG || die
+ if use doc; then
+ dohtml -r doc/docfiles doc/index.htm || die
+ fi
+}
+
+pkg_postinst() {
+ if use sudo; then
+ einfo "You have to add a line to /etc/sudoers to get access to"
+ einfo "/sys/devices/system/cpu/cpu1/cpufreq/phc_controls from the phctool/phctray"
+ einfo "Please check following line and add it to /etc/sudoser using visudo:"
+ einfo " %${MY_GROUPNAME} ALL=(root) NOPASSWD:${MY_PROGDIR}/subphctool.sh"
+ else
+ einfo "Group not automatically added. Please run phctool as root."
+ fi
+
+ python_mod_optimize ${MY_PROGDIR}
+}
+
+pkg_postrm() {
+ python_mod_cleanup ${MY_PROGDIR}
+}