/[gentoo-x86]/net-misc/dnetstats/dnetstats-1.2.6.ebuild
Gentoo

Contents of /net-misc/dnetstats/dnetstats-1.2.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Mon Feb 24 17:39:41 2014 UTC (5 years, 9 months ago) by pinkbyte
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Drop old

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x1F357D42)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/dnetstats/dnetstats-1.2.6.ebuild,v 1.6 2013/03/02 23:00:01 hwoarang Exp $
4
5 EAPI="2"
6
7 inherit eutils qt4-r2
8
9 MY_PN="DNetStats"
10 MY_P="${MY_PN}-v${PV}-release"
11
12 DESCRIPTION="Qt4 network monitor utility"
13 HOMEPAGE="http://qt-apps.org/content/show.php/DNetStats?content=107467"
14 SRC_URI="http://qt-apps.org/CONTENT/content-files/107467-${MY_P}.tar.bz2"
15
16 LICENSE="GPL-3"
17 SLOT="0"
18 KEYWORDS="amd64 x86"
19 IUSE="kde gnome"
20
21 DEPEND="dev-qt/qtgui:4"
22 RDEPEND="${DEPEND}
23 app-admin/sudo
24 kde? ( kde-base/kdesu )
25 gnome? ( x11-libs/gksu )"
26
27 S="${WORKDIR}/${MY_P}"
28
29 pkg_setup() {
30 if ! use kde && ! use gnome; then
31 ewarn
32 ewarn "You didn't enable nor kde neither gnome use flags."
33 ewarn "This means that no sudo GUI frontend will be used hence"
34 ewarn "the ${PN} menu entry won't work for normal users."
35 ewarn "Use 'sudo ${PN}' to launch the application or emerge ${PN} with"
36 ewarn "USE='kde' or USE='gnome' in order to make use of a graphical"
37 ewarn "sudo frontend"
38 ewarn
39 fi
40 }
41
42 src_prepare() {
43 # remove old moc_* files
44 rm -rf moc_* || die "failed to remove old moc_* files"
45 }
46
47 src_install() {
48 local gsudo
49 newbin mythread ${PN} || die "newbin failed"
50 dodoc ReadMe || die "dodoc failed"
51 newicon resource/energy.png ${PN}.png || die "doicon failed"
52 make_desktop_entry ${PN} DNetStats ${PN} 'Qt;Network;Dialup'
53 # adjust the .desktop file
54 use kde && gsudo="kdesu"
55 use gnome && gsudo="gksu"
56 if [[ -n ${gsudo} ]]; then
57 sed -i "/^Exec/s:${PN}:${gsudo} ${PN}:" \
58 ${D}/usr/share/applications/"${PN}"-"${PN}".desktop \
59 || die "failed to fix desktop file"
60 fi
61 }

  ViewVC Help
Powered by ViewVC 1.1.20