/[gentoo-x86]/eclass/cannadic.eclass
Gentoo

Diff of /eclass/cannadic.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.9 Revision 1.14
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
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.9 2005/07/06 20:20:03 agriffis Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cannadic.eclass,v 1.14 2006/10/21 00:07:58 flameeyes 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.
9# 9#
10 10
11INHERITED="$INHERITED $ECLASS"
12EXPORT_FUNCTIONS src_install pkg_setup pkg_postinst pkg_postrm 11EXPORT_FUNCTIONS src_install pkg_setup pkg_postinst pkg_postrm
13 12
14IUSE="${IUSE} canna" 13IUSE=""
15 14
16DESCRIPTION="Based on the $ECLASS eclass" 15DESCRIPTION="Based on the $ECLASS eclass"
17HOMEPAGE="http://canna.sourceforge.jp/" # you need to change this! 16HOMEPAGE="http://canna.sourceforge.jp/" # you need to change this!
18SRC_URI="mirror://gentoo/${P}.tar.gz" 17SRC_URI="mirror://gentoo/${P}.tar.gz"
19 18
20LICENSE="public-domain" 19LICENSE="public-domain"
21SLOT="0" 20SLOT="0"
22 21
23S="${WORKDIR}" 22S="${WORKDIR}"
24 23
25DICSDIRFILE="$(echo ${FILESDIR}/*.dics.dir)" 24DICSDIRFILE="${FILESDIR}/*.dics.dir"
26CANNADICS="${CANNADICS}" # (optional) 25CANNADICS="${CANNADICS}" # (optional)
27DOCS="README*" 26DOCS="README*"
28 27
29# You don't need to modify these 28# You don't need to modify these
30#local cannadir dicsdir 29#local cannadir dicsdir
67 66
68 for f in *.c[btl]d *.t ; do 67 for f in *.c[btl]d *.t ; do
69 cannadic-install $f 68 cannadic-install $f
70 done 2>/dev/null 69 done 2>/dev/null
71 70
72 if use canna ; then
73 dicsdir-install || die 71 dicsdir-install || die
74 fi
75 72
76 dodoc ${DOCS} 73 dodoc ${DOCS}
77} 74}
78 75
79# 76#
111 108
112# 109#
113# pkg_postinst() : updates dics.dir and print out notice after install 110# pkg_postinst() : updates dics.dir and print out notice after install
114# 111#
115cannadic_pkg_postinst() { 112cannadic_pkg_postinst() {
113 update-cannadic-dir
114 einfo
115 einfo "Please restart cannaserver to fit the changes."
116 einfo "You need to modify your config file (~/.canna) to enable dictionaries."
116 117
117 if use canna ; then 118 if [ -n "${CANNADICS}" ] ; then
118 update-cannadic-dir 119 einfo "e.g) add $(for d in ${CANNADICS}; do
119 einfo 120 echo -n "\"$d\" "
120 einfo "Please restart cannaserver to fit the changes." 121 done)to section use-dictionary()."
121 einfo "You need to modify your config file (~/.canna) to enable dictionaries." 122 einfo "For details, see documents under /usr/share/doc/${PF}"
123 fi
122 124
123 if [ -n "${CANNADICS}" ] ; then
124 einfo "e.g) add $(for d in ${CANNADICS}; do
125 echo -n \"$d\"\
126 done)to section use-dictionary()."
127 einfo "For details, see documents under /usr/share/doc/${PF}"
128 fi
129
130 einfo "If you do not have ~/.canna, you can find sample files in /usr/share/canna." 125 einfo "If you do not have ~/.canna, you can find sample files in /usr/share/canna."
131 ewarn "If you are upgrading from existing dictionary, you may need to recreate" 126 ewarn "If you are upgrading from existing dictionary, you may need to recreate"
132 ewarn "user dictionary if you have one." 127 ewarn "user dictionary if you have one."
133 einfo 128 einfo
134 fi
135} 129}
136 130
137# 131#
138# pkg_postrm() : updates dics.dir and print out notice after uninstall 132# pkg_postrm() : updates dics.dir and print out notice after uninstall
139# 133#
140cannadic_pkg_postrm() { 134cannadic_pkg_postrm() {
135 update-cannadic-dir
136 einfo
137 einfo "Please restart cannaserver to fit changes."
138 einfo "and modify your config file (~/.canna) to disable dictionary."
141 139
142 if use canna ; then 140 if [ -n "${CANNADICS}" ] ; then
143 update-cannadic-dir 141 einfo "e.g) delete $(for d in ${CANNADICS}; do
144 einfo 142 echo -n "\"$d\" "
145 einfo "Please restart cannaserver to fit changes." 143 done)from section use-dictionary()."
146 einfo "and modify your config file (~/.canna) to disable dictionary." 144 fi
147 145
148 if [ -n "${CANNADICS}" ] ; then
149 einfo "e.g) delete $(for d in ${CANNADICS}; do
150 echo -n \"$d\"\
151 done)from section use-dictionary()."
152 fi
153
154 einfo 146 einfo
155 fi
156} 147}

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20