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

Diff of /eclass/cannadic.eclass

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

Revision 1.7 Revision 1.8
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.7 2005/01/05 09:26:30 usata Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cannadic.eclass,v 1.8 2005/06/27 20:07:32 agriffis 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
11ECLASS=cannadic 11ECLASS=cannadic
12INHERITED="$INHERITED $ECLASS" 12INHERITED="$INHERITED $ECLASS"
13EXPORT_FUNCTIONS cannadic-install dicsdir-install update-cannadic-dir \
14 src_install pkg_setup pkg_postinst pkg_postrm 13EXPORT_FUNCTIONS src_install pkg_setup pkg_postinst pkg_postrm
15 14
16IUSE="${IUSE} canna" 15IUSE="${IUSE} canna"
17 16
18DESCRIPTION="Based on the $ECLASS eclass" 17DESCRIPTION="Based on the $ECLASS eclass"
19HOMEPAGE="http://canna.sourceforge.jp/" # you need to change this! 18HOMEPAGE="http://canna.sourceforge.jp/" # you need to change this!
33cannadir="${ROOT}/var/lib/canna/dic/canna" 32cannadir="${ROOT}/var/lib/canna/dic/canna"
34dicsdir="${ROOT}/var/lib/canna/dic/dics.d" 33dicsdir="${ROOT}/var/lib/canna/dic/dics.d"
35 34
36# 35#
37# pkg_setup() : sets up cannadic dir 36# pkg_setup() : sets up cannadic dir
38pkg_setup() { 37cannadic_pkg_setup() {
39 38
40 keepdir $cannadir 39 keepdir $cannadir
41 fowners bin:bin $cannadir 40 fowners bin:bin $cannadir
42 fperms 0775 $cannadir 41 fperms 0775 $cannadir
43} 42}
63 62
64# 63#
65# src_install() : installs all dictionaries under ${WORKDIR} 64# src_install() : installs all dictionaries under ${WORKDIR}
66# plus dics.dir and docs 65# plus dics.dir and docs
67# 66#
68src_install() { 67cannadic_src_install() {
69 68
70 for f in *.c[btl]d *.t ; do 69 for f in *.c[btl]d *.t ; do
71 cannadic-install $f 70 cannadic-install $f
72 done 2>/dev/null 71 done 2>/dev/null
73 72
112} 111}
113 112
114# 113#
115# pkg_postinst() : updates dics.dir and print out notice after install 114# pkg_postinst() : updates dics.dir and print out notice after install
116# 115#
117pkg_postinst() { 116cannadic_pkg_postinst() {
118 117
119 if use canna ; then 118 if use canna ; then
120 update-cannadic-dir 119 update-cannadic-dir
121 einfo 120 einfo
122 einfo "Please restart cannaserver to fit the changes." 121 einfo "Please restart cannaserver to fit the changes."
137} 136}
138 137
139# 138#
140# pkg_postrm() : updates dics.dir and print out notice after uninstall 139# pkg_postrm() : updates dics.dir and print out notice after uninstall
141# 140#
142pkg_postrm() { 141cannadic_pkg_postrm() {
143 142
144 if use canna ; then 143 if use canna ; then
145 update-cannadic-dir 144 update-cannadic-dir
146 einfo 145 einfo
147 einfo "Please restart cannaserver to fit changes." 146 einfo "Please restart cannaserver to fit changes."

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20