summaryrefslogtreecommitdiff
blob: d8dbdfe105b2000a3b466708eb74efa6a53901f8 (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-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"
inherit eutils qt4-r2 toolchain-funcs

KEYWORDS="~x86 ~amd64"

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="x11-libs/qt-gui:4
	x11-libs/qt-sql: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
}