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

Contents of /eclass/vim-spell.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Wed Sep 28 18:27:00 2005 UTC (9 years ago) by ciaranm
Branch: MAIN
initial import of the vim-spell eclass

1 ciaranm 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: $
4    
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     # * Create the app-vim/vim-spell-${CODE} package. A sample ebuild will look
28     # something like (header removed):
29     #
30     # VIM_SPELL_LANGUAGE="French"
31     #
32     # inherit vim-spell
33     #
34     # LICENSE="GPL-2"
35     # KEYWORDS="~sparc ~mips"
36     # IUSE=""
37     #
38     # * Don't forget metadata.xml. You should list vim as the herd, and yourself
39     # as the maintainer (there is no need to join the vim herd just for spell
40     # files):
41     #
42     # <?xml version="1.0" encoding="UTF-8"?>
43     # <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
44     # <pkgmetadata>
45     # <herd>vim</herd>
46     # <maintainer>
47     # <email>your-name@gentoo.org</email>
48     # </maintainer>
49     # <longdescription lang="en">
50     # Vim spell files for French (fr). Supported character sets are
51     # UTF-8 and latin1.
52     # </longdescription>
53     # </pkgmetadata>
54     #
55     # * Send an email to vim@gentoo.org to let us know.
56     #
57     # Don't forget to update your package as necessary.
58     #
59     # If there isn't an upstream-provided pregenerated spell file for your language
60     # yet, read :help spell.txt from inside vim7 for instructions on how to create
61     # spell files. It's best to let upstream know if you've generated spell files
62     # for another language rather than keeping them Gentoo-specific.
63    
64     EXPORT_FUNCTIONS src_install
65    
66     IUSE=""
67     DEPEND="|| ( >=app-editors/vim-7_alpha
68     >=app-editors/gvim-7_alpha )"
69     RDEPEND="${DEPEND}"
70     SRC_URI="mirror://gentoo/${P}.tar.bz2"
71     SLOT="0"
72    
73     if [[ -z "${VIM_SPELL_CODE}" ]] ; then
74     VIM_SPELL_CODE="${PN/vim-spell-/}"
75     fi
76    
77     if [[ -z "${DESCRIPTION}" ]] ; then
78     DESCRIPTION="vim spell files: ${VIM_SPELL_LANGUAGE} (${VIM_SPELL_CODE})"
79     fi
80    
81     if [[ -z "${HOMEPAGE}" ]] ; then
82     HOMEPAGE="http://www.vim.org/"
83     fi
84    
85     vim-spell_src_install() {
86     target="/usr/share/vim/vimfiles/spell/"
87     dodir "${target}"
88     insinto "${target}"
89    
90     had_spell_file=
91     for f in *.spl ; do
92     doins "${f}"
93     had_spell_file="yes"
94     done
95    
96     for f in README* ; do
97     dodoc "${f}"
98     done
99    
100     [[ -z "${had_spell_file}" ]] && die "Didn't install any spell files?"
101     }

  ViewVC Help
Powered by ViewVC 1.1.20