# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="4"
inherit eutils 

DESCRIPTION="CONKY-colors is an easier way to configure Conky"
HOMEPAGE="http://helmuthdu.deviantart.com/art/CONKY-Colors-244793180"
SRC_URI="http://www.deviantart.com/download/244793180/conky_colors_by_helmuthdu-d41qrmk.zip -> ${P}.zip"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="hdd sensor"

DEPEND="app-admin/conky[X,curl,imlib,lua,lua-cairo,lua-imlib,ncurses]
	dev-python/pystatgrab
	net-misc/curl
	"
RDEPEND="${DEPEND}
	media-fonts/droid
	hdd? ( app-admin/hddtemp )
	sensor? ( sys-apps/lm_sensors )"

S="${WORKDIR}/${PN/-/_}"

src_prepare() {
	sed -i -e "s:CFLAGS=-Wall -std=c99:& ${CFLAGS}:" Makefile || die "sed fix failed"
	sed -i -e "s:ln -fs \$(DESTDIR)/usr/share/conkycolors/bin/conkyTask /usr/bin/ct:ln -fs /usr/share/conkycolors/bin/conkyTask \$(DESTDIR)/usr/bin/ct:" Makefile || die "sed fix failed"
}

src_install() {
	emake DESTDIR="${D}" install || die "Install failed"
}

pkg_postinst() {
	elog "Update your font cache:"
	elog "\$sudo fc-cache -v -f"
}