# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="5" inherit eutils qt4-r2 toolchain-funcs KEYWORDS="~amd64 ~x86" MY_PN=JapaneseVocabulary DESCRIPTION="A simple vocabulary program for studying Japanese." HOMEPAGE="http://code.google.com/p/japanese-vocabulary/" SRC_URI="http://${PN}.googlecode.com/files/${MY_PN}-${PV}-src.tar.gz" LICENSE="GPL-2" SLOT="0" IUSE="" DEPEND="dev-qt/qtgui:4 dev-qt/qtsql:4[sqlite]" RDEPEND="${DEPEND}" S=${WORKDIR}/${PN} src_install() { dobin ${MY_PN} keepdir /usr/share/${PN} } pkg_postinst() { elog "To fetch an up-to-date vocabulary file, run:" elog " emerge --config =${CATEGORY}/${PF}" } pkg_config() { cd "${ROOT}usr/share/${PN}" wget "http://japanese-vocabulary.googlecode.com/files/jlpt.vocab" einfo "The vocabulary database is in:" einfo " /usr/share/${PN}" } pkg_postrm() { # do not leave orphaned cruft behind if ! has_version ${CATEGORY}/${PN} ; then [[ -d ${ROOT}/usr/share/${PN} ]] && rm -rf "${ROOT}"/usr/share/${PN} fi }