summaryrefslogtreecommitdiff
blob: e0f2a07a9c0d343616ef1c3c0578f394fe3ef590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="Utilities to parse the contents of elogs created by Portage"
HOMEPAGE="http://forums.gentoo.org/viewtopic-p-3374725.html#3374725
http://jeremywick.phpnet.us/
http://dev.gentoo.org/~dberkholz/"

SRC_URI="gtk? http://www.v-li.de/temp/${P}.tar.gz
		kde? ( http://jeremywick.phpnet.us/kelogviewer.tgz )
		text? ( http://dev.gentoo.org/~dberkholz/scripts/eread )"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="kde gtk text"

DEPEND=""
RDEPEND=">=dev-lang/python-2.3
	>=sys-apps/portage-2.1
	gtk? ( >=dev-python/pygtk-2.0 )
	kde? ( dev-python/PyQt
	     kde-base/pykde )
	text? ( app-shells/bash )"

src_unpack() {
	if !  `use text || use kde || use gtk`; then
	   eerror
	   eerror "You must specify at least one USE flag out of \"gtk kde text\""
	   eerror
	fi

	unpack ${A}
}

src_install() {
	if use kde; then
	   dobin "${WORKDIR}"/kelogviewer
	fi
	if use gtk; then
	  dobin "${WORKDIR}"/elogviewer
	  dodoc "${WORKDIR}"/CHANGELOG
	  doman "${FILESDIR}"/elogviewer.1
	fi
	if use text; then
	   dobin "${DISTDIR}"/eread
	fi
}

pkg_postinst() {
	einfo
	einfo "In order to use this software, you need to activate"
	einfo "Portage's EINFO features.  Required is"
	einfo "	     PORTAGE_EINFO_SYSTEM=\"save\" "
	einfo "and at least one out of "
	einfo "	     PORTAGE_EINFO_CLASSES=\"warn error info log\""
	einfo "More information on the EINFO system can be found"
	einfo "in /etc/make.conf.example"
	einfo
	einfo "To operate properly this software needs the directory"
	einfo "$PORT_LOGDIR/einfo created, belonging to group portage."
	einfo "To start the software as a user, add yourself to the portage"
	einfo "group."
	einfo
	einfo "You chose"
	use gtk && einfo "\t GTK frontend, which is called through /usr/bin/elogviewer"
	use kde && einfo "\t KDE frontend, which is called through /usr/bin/kelogviewer"
	use text && einfo "\t text frontend, which is called through /usr/bin/eread"
	einfo
}