sys-power/apcupsd: Fixup missing || die
[gentoo.git] / eclass / aspell-dict.eclass
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 # @ECLASS: aspell-dict.eclass
6 # @MAINTAINER:
7 # maintainer-needed@gentoo.org
8 # @AUTHOR:
9 # Original author: Seemant Kulleen
10 # @BLURB: An eclass to streamline the construction of ebuilds for new aspell dicts
11 # @DESCRIPTION:
12 # The aspell-dict eclass is designed to streamline the construction of
13 # ebuilds for the new aspell dictionaries (from gnu.org) which support
14 # aspell-0.50. Support for aspell-0.60 has been added by Sergey Ulanov.
15
16 # @ECLASS-VARIABLE: ASPELL_LANG
17 # @REQUIRED
18 # @DESCRIPTION:
19 # Which language is the dictionary for? It's used for the DESCRIPTION of the
20 # package.
21
22 # @ECLASS-VARIABLE: ASPOSTFIX
23 # @REQUIRED
24 # @DESCRIPTION:
25 # What major version of aspell is this dictionary for?
26
27 EXPORT_FUNCTIONS src_compile src_install
28
29 #MY_P=${PN}-${PV%.*}-${PV#*.*.}
30 MY_P=${P%.*}-${PV##*.}
31 MY_P=aspell${ASPOSTFIX}-${MY_P/aspell-/}
32 SPELLANG=${PN/aspell-/}
33 S="${WORKDIR}/${MY_P}"
34 DESCRIPTION="${ASPELL_LANG} language dictionary for aspell"
35 HOMEPAGE="http://aspell.net"
36 SRC_URI="mirror://gnu/aspell/dict/${SPELLANG}/${MY_P}.tar.bz2"
37
38 IUSE=""
39 SLOT="0"
40
41 if [ x${ASPOSTFIX} = x6 ] ; then
42         RDEPEND=">=app-text/aspell-0.60"
43         DEPEND="${RDEPEND}"
44 else
45         RDEPEND=">=app-text/aspell-0.50"
46         DEPEND="${RDEPEND}"
47 fi
48
49 # @FUNCTION: aspell-dict_src_compile
50 # @DESCRIPTION:
51 # The aspell-dict src_compile function which is exported.
52 aspell-dict_src_compile() {
53         ./configure || die
54         emake || die
55 }
56
57 # @FUNCTION: aspell-dict_src_install
58 # @DESCRIPTION:
59 # The aspell-dict src_install function which is exported.
60 aspell-dict_src_install() {
61         make DESTDIR="${D}" install || die
62
63         for doc in README info ; do
64                 [ -s "$doc" ] && dodoc $doc
65         done
66 }