summaryrefslogtreecommitdiff
blob: 2491bd5d5926c19a94bd54b542126b21e3b7323a (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
48
49
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-dicts/canna-cannadic/canna-cannadic-0.94h.ebuild,v 1.5 2004/03/19 11:23:21 usata Exp $

MY_P="${P/canna-/}"

DESCRIPTION="Japanese kana-kanji conversion dictionary for Canna"
HOMEPAGE="http://cannadic.oucrc.org/"
SRC_URI="http://cannadic.oucrc.org/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ppc sparc alpha"
IUSE=""
DEPEND=">=app-i18n/canna-3.6_p3-r1"
S="${WORKDIR}/${MY_P}"

src_compile() {
	make maindic || die
}

src_install() {
	dodir /var/lib/canna/dic/canna/
	install -o bin -g bin -m 0664 gcanna.c[bl]d gcannaf.t \
		${D}/var/lib/canna/dic/canna/
	insinto /var/lib/canna/dic/dics.d/ ;\
		doins ${FILESDIR}/01cannadic.dics.dir
	dodoc COPYING README
}

pkg_postinst() {
	if [ -x /usr/sbin/update-canna-dics_dir ]; then
		einfo "Regenerating dics.dir file..."
		/usr/sbin/update-canna-dics_dir || die "Regenerating failed."
	fi
	einfo "Please restart cannaserver to fit changes."
	einfo "and modify your config file (~/.canna ) to enable dictionay."
	einfo " e.g) add \"gcanna\" \"gcannaf\" to section use-dictionary()"
	einfo "For details, see /usr/share/doc/${P}/README.gz"
}

pkg_postrm() {
	if [ -x /usr/sbin/update-canna-dics_dir ]; then
		einfo "Regenerating dics.dir file..."
		/usr/sbin/update-canna-dics_dir || die "Regenerating failed."
	fi
	einfo "Please restart cannaserver to fit changes."
	einfo "and modify your config file (~/.canna ) to disable dictionay."
	einfo " e.g) delete \"gcanna\" \"gcannaf\" from section use-dictionary()"
}