summaryrefslogtreecommitdiff
blob: 0f7c72e40a631f7d8c9aac14b6e864fe4f5e3456 (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
# 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
}