c09c1a11c64bb8e78ee06a56a774a513b692fc3a
[gentoo.git] / app-dicts / myspell-nl / myspell-nl-2.10g-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 MYSPELL_DICT=(
7         "nl.aff"
8         "nl.dic"
9 )
10
11 MYSPELL_HYPH=(
12         "hyph_nl.dic"
13 )
14
15 MYSPELL_THES=(
16         "th_nl_v2.dat"
17         "th_nl_v2.idx"
18 )
19
20 inherit myspell-r2
21
22 DESCRIPTION="Dutch dictionaries for myspell/hunspell"
23 HOMEPAGE="https://www.opentaal.org"
24 # Thesarus is not versioned at all, I suppose we could bump it with each dict
25 # release, or when people say that the download uri checksum changed.
26 SRC_URI="
27         https://www.opentaal.org/bestanden/license_result/20-woordenlijst-v-${PV//./}-voor-openofficeorg-3?bid=20&agree=1 -> ${P}.oxt
28         https://data.opentaal.org/opentaalbank/thesaurus/download/thes_nl.oxt -> ${P}_thes.oxt
29 "
30
31 LICENSE="BSD-2 CC-BY-3.0"
32 SLOT="0"
33 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86"
34
35 src_prepare() {
36         default
37
38         # rename terroritory specific to just language, bug #607080
39         mv nl_NL.aff nl.aff || die
40         mv nl_NL.dic nl.dic || die
41         mv hyph_nl_NL.dic hyph_nl.dic || die
42
43         # remove dutch translated license so it aint installed
44         rm licentie* || die
45 }
46
47 src_install() {
48         myspell-r2_src_install
49
50         # make language_territory locale format symlinks to base language files, bug #699660
51         dosym ../hunspell/nl.aff /usr/share/myspell/nl_NL.aff
52         dosym ../hunspell/nl.dic /usr/share/myspell/nl_NL.dic
53         dosym ../hyphen/hyph_nl.dic /usr/share/myspell/hyph_nl_NL.dic
54         dosym ../mythes/th_nl_v2.dat /usr/share/myspell/th_nl_NL_v2.dat
55         dosym ../mythes/th_nl_v2.idx /usr/share/myspell/th_nl_NL_v2.idx
56
57         # Belgium
58         dosym ../hunspell/nl.aff /usr/share/myspell/nl_BE.aff
59         dosym ../hunspell/nl.dic /usr/share/myspell/nl_BE.dic
60         dosym ../hyphen/hyph_nl.dic /usr/share/myspell/hyph_nl_BE.dic
61         dosym ../mythes/th_nl_v2.dat /usr/share/myspell/th_nl_BE_v2.dat
62         dosym ../mythes/th_nl_v2.idx /usr/share/myspell/th_nl_BE_v2.idx
63 }