| 1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/cannadic.eclass,v 1.3 2004/02/17 07:36:54 mr_bones_ Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/cannadic.eclass,v 1.4 2004/05/05 11:41:24 usata Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Mamoru KOMACHI <usata@gentoo.org> |
5 | # Author: Mamoru KOMACHI <usata@gentoo.org> |
| 6 | # |
6 | # |
| 7 | # The cannadic eclass is used for installation and setup of Canna |
7 | # The cannadic eclass is used for installation and setup of Canna |
| 8 | # compatible dictionaries within the Portage system. |
8 | # compatible dictionaries within the Portage system. |
| … | |
… | |
| 18 | DESCRIPTION="Based on the $ECLASS eclass" |
18 | DESCRIPTION="Based on the $ECLASS eclass" |
| 19 | HOMEPAGE="http://canna.sourceforge.jp/" # you need to change this! |
19 | HOMEPAGE="http://canna.sourceforge.jp/" # you need to change this! |
| 20 | SRC_URI="mirror://gentoo/${P}.tar.gz" |
20 | SRC_URI="mirror://gentoo/${P}.tar.gz" |
| 21 | |
21 | |
| 22 | LICENSE="public-domain" |
22 | LICENSE="public-domain" |
| 23 | # I added all keywords form /usr/portage/profiles/keyword.desc atm since |
|
|
| 24 | # cannadic source is basically plain text and will run on any platform |
|
|
| 25 | KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hpps ~amd64" |
|
|
| 26 | SLOT="0" |
23 | SLOT="0" |
| 27 | |
24 | |
| 28 | S="${WORKDIR}" |
25 | S="${WORKDIR}" |
| 29 | |
26 | |
| 30 | DICSDIRFILE="$(echo ${FILESDIR}/*.dics.dir)" |
27 | DICSDIRFILE="$(echo ${FILESDIR}/*.dics.dir)" |
| 31 | CANNADICS="${CANNADICS}" # (optional) |
28 | CANNADICS="${CANNADICS}" # (optional) |
| 32 | DOCS="README*" |
29 | DOCS="README*" |
| 33 | |
30 | |
| 34 | # You don't need to modify these |
31 | # You don't need to modify these |
| 35 | #local cannadir dicsdir |
32 | #local cannadir dicsdir |
| 36 | cannadir="/var/lib/canna/dic/canna" |
33 | cannadir="${ROOT}/var/lib/canna/dic/canna" |
| 37 | dicsdir="/var/lib/canna/dic/dics.d" |
34 | dicsdir="${ROOT}/var/lib/canna/dic/dics.d" |
| 38 | |
35 | |
| 39 | # |
36 | # |
| 40 | # pkg_setup() : sets up cannadic dir |
37 | # pkg_setup() : sets up cannadic dir |
| 41 | pkg_setup() { |
38 | pkg_setup() { |
| 42 | |
39 | |
| … | |
… | |
| 120 | pkg_postinst() { |
117 | pkg_postinst() { |
| 121 | |
118 | |
| 122 | if [ -n "`use canna`" ] ; then |
119 | if [ -n "`use canna`" ] ; then |
| 123 | update-cannadic-dir |
120 | update-cannadic-dir |
| 124 | einfo |
121 | einfo |
| 125 | einfo "Please restart cannaserver to fit changes." |
122 | einfo "Please restart cannaserver to fit the changes." |
| 126 | einfo "and modify your config file (~/.canna) to enable dictionary." |
123 | einfo "You need to modify your config file (~/.canna) to enable dictionaries." |
| 127 | |
124 | |
| 128 | if [ -n "${CANNADICS}" ] ; then |
125 | if [ -n "${CANNADICS}" ] ; then |
| 129 | einfo "e.g) add $(for d in ${CANNADICS}; do |
126 | einfo "e.g) add $(for d in ${CANNADICS}; do |
| 130 | echo -n \"$d\"\ |
127 | echo -n \"$d\"\ |
| 131 | done)to section use-dictionary()." |
128 | done)to section use-dictionary()." |
| 132 | einfo "For details, see documents under /usr/share/doc/${PF}" |
129 | einfo "For details, see documents under /usr/share/doc/${PF}" |
| 133 | fi |
130 | fi |
| 134 | |
131 | |
|
|
132 | ewarn "If you are upgrading from existing dictionary, you may need to recreate" |
|
|
133 | ewarn "user dictionary if you have one." |
| 135 | einfo |
134 | einfo |
| 136 | fi |
135 | fi |
| 137 | } |
136 | } |
| 138 | |
137 | |
| 139 | # |
138 | # |