| 1 |
ciaranm |
1.1 |
# Copyright 1999-2005 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
ciaranm |
1.2 |
# $Header: /var/cvsroot/gentoo-x86/eclass/vim-spell.eclass,v 1.1 2005/09/28 18:27:00 ciaranm Exp $
|
| 4 |
ciaranm |
1.1 |
|
| 5 |
|
|
#
|
| 6 |
|
|
# Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
|
| 7 |
|
|
# Maintainers: Vim Herd <vim@gentoo.org>
|
| 8 |
|
|
# Purpose: Simplify installing spell files for vim7
|
| 9 |
|
|
#
|
| 10 |
|
|
|
| 11 |
|
|
# How to make a vim spell file package using prebuilt spell lists
|
| 12 |
|
|
# from upstream (${CODE} is the language's two letter code):
|
| 13 |
|
|
#
|
| 14 |
|
|
# * Get the ${CODE}.*.spl and README_${CODE}.txt files. Currently they're
|
| 15 |
|
|
# at ftp://ftp.vim.org/pub/vim/unstable/runtime/spell/ .
|
| 16 |
|
|
#
|
| 17 |
|
|
# * 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
|
| 19 |
|
|
# with S=.
|
| 20 |
|
|
#
|
| 21 |
|
|
# * Upload the tarball to the Gentoo mirrors.
|
| 22 |
|
|
#
|
| 23 |
|
|
# * (for now) Add your spell file to package.mask next to the other vim7
|
| 24 |
|
|
# things. The vim herd will handle unmasking your spell packages when vim7
|
| 25 |
|
|
# comes out of package.mask.
|
| 26 |
|
|
#
|
| 27 |
ciaranm |
1.2 |
# * Create the app-vim/vim-spell-${CODE} package. You should base your ebuild
|
| 28 |
|
|
# upon app-vim/vim-spell-en. You will need to change VIM_SPELL_LANGUAGE,
|
| 29 |
|
|
# KEYWORDS and LICENSE. Check the license carefully! The README will tell
|
| 30 |
|
|
# you what it is.
|
| 31 |
ciaranm |
1.1 |
#
|
| 32 |
|
|
# * Don't forget metadata.xml. You should list vim as the herd, and yourself
|
| 33 |
|
|
# as the maintainer (there is no need to join the vim herd just for spell
|
| 34 |
|
|
# files):
|
| 35 |
|
|
#
|
| 36 |
|
|
# <?xml version="1.0" encoding="UTF-8"?>
|
| 37 |
|
|
# <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
| 38 |
|
|
# <pkgmetadata>
|
| 39 |
|
|
# <herd>vim</herd>
|
| 40 |
|
|
# <maintainer>
|
| 41 |
|
|
# <email>your-name@gentoo.org</email>
|
| 42 |
|
|
# </maintainer>
|
| 43 |
|
|
# <longdescription lang="en">
|
| 44 |
|
|
# Vim spell files for French (fr). Supported character sets are
|
| 45 |
|
|
# UTF-8 and latin1.
|
| 46 |
|
|
# </longdescription>
|
| 47 |
|
|
# </pkgmetadata>
|
| 48 |
|
|
#
|
| 49 |
|
|
# * Send an email to vim@gentoo.org to let us know.
|
| 50 |
|
|
#
|
| 51 |
|
|
# Don't forget to update your package as necessary.
|
| 52 |
|
|
#
|
| 53 |
|
|
# If there isn't an upstream-provided pregenerated spell file for your language
|
| 54 |
|
|
# yet, read :help spell.txt from inside vim7 for instructions on how to create
|
| 55 |
|
|
# spell files. It's best to let upstream know if you've generated spell files
|
| 56 |
|
|
# for another language rather than keeping them Gentoo-specific.
|
| 57 |
|
|
|
| 58 |
|
|
EXPORT_FUNCTIONS src_install
|
| 59 |
|
|
|
| 60 |
|
|
IUSE=""
|
| 61 |
|
|
DEPEND="|| ( >=app-editors/vim-7_alpha
|
| 62 |
|
|
>=app-editors/gvim-7_alpha )"
|
| 63 |
|
|
RDEPEND="${DEPEND}"
|
| 64 |
|
|
SRC_URI="mirror://gentoo/${P}.tar.bz2"
|
| 65 |
|
|
SLOT="0"
|
| 66 |
|
|
|
| 67 |
|
|
if [[ -z "${VIM_SPELL_CODE}" ]] ; then
|
| 68 |
|
|
VIM_SPELL_CODE="${PN/vim-spell-/}"
|
| 69 |
|
|
fi
|
| 70 |
|
|
|
| 71 |
|
|
if [[ -z "${DESCRIPTION}" ]] ; then
|
| 72 |
|
|
DESCRIPTION="vim spell files: ${VIM_SPELL_LANGUAGE} (${VIM_SPELL_CODE})"
|
| 73 |
|
|
fi
|
| 74 |
|
|
|
| 75 |
|
|
if [[ -z "${HOMEPAGE}" ]] ; then
|
| 76 |
|
|
HOMEPAGE="http://www.vim.org/"
|
| 77 |
|
|
fi
|
| 78 |
|
|
|
| 79 |
|
|
vim-spell_src_install() {
|
| 80 |
|
|
target="/usr/share/vim/vimfiles/spell/"
|
| 81 |
|
|
dodir "${target}"
|
| 82 |
|
|
insinto "${target}"
|
| 83 |
|
|
|
| 84 |
|
|
had_spell_file=
|
| 85 |
|
|
for f in *.spl ; do
|
| 86 |
|
|
doins "${f}"
|
| 87 |
|
|
had_spell_file="yes"
|
| 88 |
|
|
done
|
| 89 |
|
|
|
| 90 |
|
|
for f in README* ; do
|
| 91 |
|
|
dodoc "${f}"
|
| 92 |
|
|
done
|
| 93 |
|
|
|
| 94 |
|
|
[[ -z "${had_spell_file}" ]] && die "Didn't install any spell files?"
|
| 95 |
|
|
}
|
| 96 |
|
|
|