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

EAPI="4"

inherit gnome2-utils

DESCRIPTION="Nice and well polished icon themes for the GNOME desktop."
HOMEPAGE="https://launchpad.net/humanity"
SRC_URI="mirror://ubuntu/pool/main/h/${PN}/${PN}_${PV}.tar.gz"

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

RDEPEND="x11-themes/hicolor-icon-theme
	x11-themes/gnome-icon-theme"
DEPEND=""

RESTRICT="binchecks mirror strip"

S=${WORKDIR}/${PN}

src_install() {
	insinto /usr/share/icons
	doins -r Humanity Humanity-Dark
	rm "${D}"/usr/share/icons/Humanity/{AUTHORS,CONTRIBUTORS,COPYING}
	rm "${D}"/usr/share/icons/Humanity-Dark/{AUTHORS,COPYING}
	dodoc Humanity/{AUTHORS,CONTRIBUTORS}
	dodoc debian/changelog
}

pkg_preinst() {
	gnome2_icon_savelist;
}

pkg_postinst() {
	gnome2_icon_cache_update;
}

pkg_postrm() {
	gnome2_icon_cache_update;
}