aboutsummaryrefslogtreecommitdiffstats
path: root/main/hunspell-en/APKBUILD
blob: 65879a6162da12b21e4585a2fcad01446c2d9fe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=hunspell-en
pkgver=2015.05.18
pkgrel=0
pkgdesc="English hunspell dictionaries"
url="http://wordlist.aspell.net/dicts/"
arch="noarch"
license="LGPL2+ scowl"
depends=""
makedepends=""
source="http://downloads.sourceforge.net/project/wordlist/speller/$pkgver/hunspell-en_US-$pkgver.zip
        http://downloads.sourceforge.net/project/wordlist/speller/$pkgver/hunspell-en_CA-$pkgver.zip
        http://downloads.sourceforge.net/project/wordlist/speller/$pkgver/hunspell-en_GB-large-$pkgver.zip
	"

_builddir="$srcdir"/$pkgname-$pkgver

unpack() {
	msg "Unpacking sources..."
	mkdir -p "$_builddir"
	cd "$_builddir"
	for u in $source; do
		local s="$SRCDEST/$(filename_from_uri $u)"
		unzip $s
	done
}

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	sed -i "s:SET UTF8:SET UTF-8:g"  *.aff
}

build() {
	:
}

package() {
	cd "$_builddir"

	install -dm755 $pkgdir/usr/share/hunspell
	install -m644 en_*.dic en_*.aff $pkgdir/usr/share/hunspell

	local lang
	for lang in en_AG en_AU en_BS en_BW en_BZ en_DK en_GB en_GH en_HK en_IE en_IN en_JM en_NA en_NG en_NZ en_SG en_TT en_ZA en_ZW; do
		ln -svf en_GB-large.aff $pkgdir/usr/share/hunspell/$lang.aff
		ln -svf en_GB-large.dic $pkgdir/usr/share/hunspell/$lang.dic
	done
	for lang in en_PH; do
		ln -svf en_US.aff $pkgdir/usr/share/hunspell/$lang.aff
		ln -svf en_US.dic $pkgdir/usr/share/hunspell/$lang.dic
	done

	# docs
	install -dm755 ${pkgdir}/usr/share/doc/$pkgname
	install -m644 README_en_*.txt $pkgdir/usr/share/doc/$pkgname

	# licenses
	install -D -m644 README_en_US.txt $pkgdir/usr/share/licenses/$pkgname/Copyright_en_US
	install -D -m644 README_en_CA.txt $pkgdir/usr/share/licenses/$pkgname/Copyright_en_CA
	install -D -m644 README_en_GB-large.txt $pkgdir/usr/share/licenses/$pkgname/Copyright_en_GB-large
}

md5sums="e50262ca670eed64bb8e85f4982407fb  hunspell-en_US-2015.05.18.zip
59b80ada0cbdd964620e12de51e06b67  hunspell-en_CA-2015.05.18.zip
5bcf9e028bae43ccd4c6d6483bc26a96  hunspell-en_GB-large-2015.05.18.zip"
sha256sums="ddea773af2f73cb6d00eb30cbadca2e8dbd86205bb1585c1ea455fbf90fde3e6  hunspell-en_US-2015.05.18.zip
f6bcb51f06d60e8ee447e9afd04c65082b7b204d63f69742128058e84c2b9f00  hunspell-en_CA-2015.05.18.zip
bd0e1529eccc5ad437cf4eec8b937ff24079a5d05ea3cbf16849c8b3c38ad2d4  hunspell-en_GB-large-2015.05.18.zip"
sha512sums="e36259c4a2a97cb0166a8b8afafb2f2f6c56fd4439231af52cbe7b00be56b429f7273c23a135c746525475d3f75c337952ef7dadca9404fe9b98c541190d3e0d  hunspell-en_US-2015.05.18.zip
d4cf48c4e87adc2a55faa961ffa2ea3c11588aaae297b184a61d93cdd2913da790ab9e5c0461c08905008337b6902b5d92e9b7f5a6a02b44ffcc0d81281368a1  hunspell-en_CA-2015.05.18.zip
e8c27663f712ce4f43fc4de6acc05704f41726dc70eab46c03f7b9d634bffbaba86c25ed120446f7a690eb427a329c9b853938fa4b990d224d8cef7e1f2dde0f  hunspell-en_GB-large-2015.05.18.zip"