summaryrefslogtreecommitdiff
blob: a54fcb35ad84e383a55e420bf94a520ebfc9da44 (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-2003 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.95.ebuild,v 1.2 2003/07/16 15:02:02 pvdabeel 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=">=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.ctd \
		${D}/var/lib/canna/dic/canna/
	insinto /var/lib/canna/dic/dics.d/
	doins ${FILESDIR}/05cannadic.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()"
}