Merge github#920: app-arch/zopfli: Version bump 1.0.1.
[gentoo.git] / app-laptop / ibam / ibam-0.5.2-r3.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6
7 PATCH_LEVEL=2
8
9 inherit eutils multilib toolchain-funcs
10
11 DESCRIPTION="Intelligent Battery Monitor"
12 HOMEPAGE="http://ibam.sourceforge.net/"
13 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
14         mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${PATCH_LEVEL}.diff.gz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="gkrellm"
20
21 RDEPEND="
22         gkrellm? (
23                 app-admin/gkrellm
24                 x11-libs/gdk-pixbuf
25                 x11-libs/gtk+:2
26         )"
27 DEPEND="
28         ${RDEPEND}
29         gkrellm? ( virtual/pkgconfig )"
30
31 src_prepare() {
32         epatch \
33                 "${FILESDIR}"/${P}-build.patch \
34                 "${WORKDIR}"/${PN}_${PV}-${PATCH_LEVEL}.diff
35
36         local f
37         for f in `find . -name '*.dpatch'`; do
38                 epatch ${f}
39         done
40 }
41
42 src_compile() {
43         tc-export CXX
44         emake
45         use gkrellm && emake krell
46 }
47
48 src_install() {
49         dobin ibam
50         dodoc CHANGES README REPORT
51
52         if use gkrellm; then
53                 insinto /usr/$(get_libdir)/gkrellm2/plugins
54                 doins ibam-krell.so
55         fi
56 }
57
58 pkg_postinst() {
59         elog
60         elog "You will need to install sci-visualization/gnuplot if you wish to use"
61         elog "the --plot argument to ibam."
62         elog
63 }