www-client/google-chrome-beta: automated update (84.0.4147.30)
[gentoo.git] / eclass / freedict.eclass
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # @ECLASS: freedict.eclass
5 # @MAINTAINER:
6 # maintainer-needed@gentoo.org
7 # @AUTHOR:
8 # Original author: Seemant Kulleen
9 # @SUPPORTED_EAPIS: 6
10 # @BLURB: Ease the installation of freedict translation dictionaries
11 # @DESCRIPTION:
12 # This eclass exists to ease the installation of freedict translation
13 # dictionaries.  The only variables which need to be defined in the actual
14 # ebuilds are FORLANG and TOLANG for the source and target languages,
15 # respectively.
16
17 # @ECLASS-VARIABLE: FORLANG
18 # @DESCRIPTION:
19 # Please see above for a description.
20
21 # @ECLASS-VARIABLE: TOLANG
22 # @DESCRIPTION:
23 # Please see above for a description.
24
25 case ${EAPI:-0} in
26         6) ;;
27         *) die "${ECLASS}.eclass is banned in EAPI=${EAPI}" ;;
28 esac
29
30 MY_P=${PN/freedict-/}
31
32 DESCRIPTION="Freedict for language translation from ${FORLANG} to ${TOLANG}"
33 HOMEPAGE="http://freedict.sourceforge.net/"
34 SRC_URI="http://freedict.sourceforge.net/download/linux/${MY_P}.tar.gz"
35
36 LICENSE="GPL-2+"
37 SLOT="0"
38
39 RDEPEND="app-text/dictd"
40
41 S="${WORKDIR}"
42
43 # @FUNCTION: freedict_src_install
44 # @DESCRIPTION:
45 # The freedict src_install function, which is exported
46 freedict_src_install() {
47         insinto /usr/$(get_libdir)/dict
48         doins ${MY_P}.dict.dz
49         doins ${MY_P}.index
50 }
51
52 EXPORT_FUNCTIONS src_install