]> Pileus Git - ~andy/sunrise/blob - x11-misc/trayfreq/trayfreq-0.2_pre2.ebuild
1b4361aa7fe9e3ef3bad59e8a3789c2b75ec0cb1
[~andy/sunrise] / x11-misc / trayfreq / trayfreq-0.2_pre2.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=4
6
7 inherit eutils versionator
8
9 MY_P=${PN}-$(version_format_string '$1.$2.x-dev2')
10
11 DESCRIPTION="A GTK+ CPU and Battery Tray Tool"
12 HOMEPAGE="http://trayfreq.sourceforge.net/"
13 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
14
15 LICENSE="GPL-3"
16 SLOT="0"
17 KEYWORDS="~amd64"
18 IUSE="autostart suid"
19
20 DEPEND="x11-libs/gtk+:2"
21 RDEPEND="${DEPEND}"
22
23 S=${WORKDIR}/${MY_P}
24
25 src_configure() {
26         econf $(use_enable suid setsuid) \
27                 $(use_enable autostart)
28 }
29
30 src_install() {
31         emake DESTDIR="${D}" install
32
33         dodoc AUTHORS README data/trayfreq.config
34         newicon data/cpufreq-0.png ${PN}.png
35         make_desktop_entry ${PN} "Tray Tool for cpufreq" ${PN}
36 }
37
38 pkg_postinst() {
39         if ! use suid; then
40                 elog "trayfreq requires root privileges"
41                 elog "if you use sudo you may have to edit sudoers"
42                 elog "config file will be read from root directory"
43         fi
44         elog "a sample config file resides in documentation"
45 }