/[gentoo-x86]/eclass/vim-spell.eclass
Gentoo

Diff of /eclass/vim-spell.eclass

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

Revision 1.3 Revision 1.6
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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/vim-spell.eclass,v 1.3 2005/09/28 19:59:46 ciaranm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/vim-spell.eclass,v 1.6 2007/03/21 03:40:22 pioto Exp $
4 4
5# 5#
6# Original Author: Ciaran McCreesh <ciaranm@gentoo.org> 6# Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
7# Maintainers: Vim Herd <vim@gentoo.org> 7# Maintainers: Vim Herd <vim@gentoo.org>
8# Purpose: Simplify installing spell files for vim7 8# Purpose: Simplify installing spell files for vim7
9# 9#
10 10
11# How to make a vim spell file package using prebuilt spell lists 11# How to make a vim spell file package using prebuilt spell lists
12# from upstream (${CODE} is the language's two letter code): 12# from upstream (${CODE} is the language's two letter code):
13# 13#
14# * Get the ${CODE}.*.spl and README_${CODE}.txt files. Currently they're 14# * Get the ${CODE}.*.spl, ${CODE}.*.sug (if your language has them) and
15# README_${CODE}.txt files. Currently they're at
15# at ftp://ftp.vim.org/pub/vim/unstable/runtime/spell/ . 16# ftp://ftp.vim.org/pub/vim/unstable/runtime/spell/ (except for English,
17# which should be taken from CVS instead).
16# 18#
17# * Stick them in vim-spell-${CODE}-$(date --iso | tr -d - ).tar.bz2 . Make sure 19# * Stick them in vim-spell-${CODE}-$(date --iso | tr -d - ).tar.bz2 . Make sure
18# that they're in the appropriately named subdirectory to avoid having to mess 20# that they're in the appropriately named subdirectory to avoid having to mess
19# with S=. 21# with S=.
20# 22#
68 70
69if [[ -z "${VIM_SPELL_CODE}" ]] ; then 71if [[ -z "${VIM_SPELL_CODE}" ]] ; then
70 VIM_SPELL_CODE="${PN/vim-spell-/}" 72 VIM_SPELL_CODE="${PN/vim-spell-/}"
71fi 73fi
72 74
73if [[ -z "${DESCRIPTION}" ]] ; then
74 DESCRIPTION="vim spell files: ${VIM_SPELL_LANGUAGE} (${VIM_SPELL_CODE})" 75DESCRIPTION="vim spell files: ${VIM_SPELL_LANGUAGE} (${VIM_SPELL_CODE})"
75fi
76 76
77if [[ -z "${HOMEPAGE}" ]] ; then 77if [[ -z "${HOMEPAGE}" ]] ; then
78 HOMEPAGE="http://www.vim.org/" 78 HOMEPAGE="http://www.vim.org/"
79fi 79fi
80 80
82 target="/usr/share/vim/vimfiles/spell/" 82 target="/usr/share/vim/vimfiles/spell/"
83 dodir "${target}" 83 dodir "${target}"
84 insinto "${target}" 84 insinto "${target}"
85 85
86 had_spell_file= 86 had_spell_file=
87 for f in *.spl ; do 87 for f in *.spl *.sug ; do
88 doins "${f}" 88 doins "${f}"
89 had_spell_file="yes" 89 had_spell_file="yes"
90 done 90 done
91 91
92 for f in README* ; do 92 for f in README* ; do
97} 97}
98 98
99vim-spell_pkg_postinst() { 99vim-spell_pkg_postinst() {
100 target="/usr/share/vim/vimfiles/spell/" 100 target="/usr/share/vim/vimfiles/spell/"
101 echo 101 echo
102 einfo "To enable ${VIM_SPELL_LANGUAGE} spell checking, use" 102 elog "To enable ${VIM_SPELL_LANGUAGE} spell checking, use"
103 einfo " :setlocal spell spelllang=${VIM_SPELL_CODE}" 103 elog " :setlocal spell spelllang=${VIM_SPELL_CODE}"
104 echo 104 echo
105 einfo "The following (Vim internal, not file) encodings are supported for" 105 elog "The following (Vim internal, not file) encodings are supported for"
106 einfo "this language:" 106 elog "this language:"
107 for f in "${ROOT}/${target}/${VIM_SPELL_CODE}".*.spl ; do 107 for f in "${ROOT}/${target}/${VIM_SPELL_CODE}".*.spl ; do
108 enc="${f##*/${VIM_SPELL_CODE}.}" 108 enc="${f##*/${VIM_SPELL_CODE}.}"
109 enc="${enc%.spl}" 109 enc="${enc%.spl}"
110 [[ -z "${enc}" ]] && continue 110 [[ -z "${enc}" ]] && continue
111 einfo " ${enc}" 111 elog " ${enc}"
112 done 112 done
113 echo 113 echo
114 einfo "For further documentation, use:" 114 elog "For further documentation, use:"
115 einfo " :help spell" 115 elog " :help spell"
116 echo 116 echo
117 epause 117 epause
118} 118}
119 119

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20