]> Pileus Git - ~andy/sunrise/blob - app-misc/japanese-vocabulary/japanese-vocabulary-0.6.ebuild
app-misc/japanese-vocabulary: Switch to EAPI-1 and slotted deps
[~andy/sunrise] / app-misc / japanese-vocabulary / japanese-vocabulary-0.6.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="1"
6 inherit eutils qt4 toolchain-funcs
7
8 KEYWORDS="~x86"
9
10 MY_PN=JapaneseVocabulary
11
12 DESCRIPTION="A simple vocabulary program for studying Japanese."
13 HOMEPAGE="http://code.google.com/p/japanese-vocabulary/"
14 SRC_URI="http://${PN}.googlecode.com/files/${MY_PN}-${PV}-src.tar.gz"
15 LICENSE="GPL-2"
16 SLOT="0"
17 IUSE=""
18
19 DEPEND=">=x11-libs/qt-4.2:4"
20 RDEPEND="${DEPEND}"
21
22 QT4_BUILT_WITH_USE_CHECK="sqlite3"
23 S=${WORKDIR}/${PN}
24
25 src_compile() {
26         eqmake4 ${MY_PN}.pro
27         emake || die "emake failed"
28 }
29
30 src_install() {
31         dobin ${MY_PN}
32         keepdir /usr/share/${PN}
33 }
34
35 pkg_postinst() {
36         elog "To fetch an up-to-date vocabulary file, run:"
37         elog "  emerge --config =${CATEGORY}/${PF}"
38 }
39
40 pkg_config() {
41         cd "${ROOT}usr/share/${PN}"
42         wget "http://japanese-vocabulary.googlecode.com/files/jlpt.vocab"
43         einfo "The vocabulary database is in:"
44         einfo "  /usr/share/${PN}"
45 }
46
47 pkg_postrm() {
48         # do not leave orphaned cruft behind
49         [[ -e ${ROOT}/usr/share/${PN} ]] && rm -rf /usr/share/${PN}
50 }