aboutsummaryrefslogtreecommitdiffstats
path: root/main/hunspell-en/APKBUILD
blob: b8a76a477ef919038b80f0d083de6891d6d4fc0a (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=2016.01.19
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="de94962667a51ef9d65c7804b0b62971  hunspell-en_US-2016.01.19.zip
fc1f621871b2f78598e7ddebe7c3f0e6  hunspell-en_CA-2016.01.19.zip
53d431a7f1db8178610e0c42bf2a4d6a  hunspell-en_GB-large-2016.01.19.zip"
sha256sums="fe0c48084bfd534f244ecd12836ae5e0b27fc10dab28879fdafece892267a674  hunspell-en_US-2016.01.19.zip
f59b120b43ab444ee33e018a6416f3be70f867a928956fe4a1750245fd57a341  hunspell-en_CA-2016.01.19.zip
edcca9b78ae8923e6209db523355b4a91ac6d9daad94df12413498b4e5069719  hunspell-en_GB-large-2016.01.19.zip"
sha512sums="12696efdbb98e4f70108302d086539ff3b2b85fcddc34348b852235c29a4a863eccef4d591f5e2e66f3210797538bae508c10bf8d99fe4b541700f3b0dcbac32  hunspell-en_US-2016.01.19.zip
26bb97dc8fd20e7d1980b16ce28822dc9c4db1295908e0daf6dfb860a07e3416162f0c5322663f02422dde22d09e9369c037a14a9b487c9aad256e2467d172ed  hunspell-en_CA-2016.01.19.zip
0db63511a131116845ca005acdb8231a463cd7a383e933be3b276b7d0f9a2dab657ecc3c565449cd52d55d092a1c8f5c9441ea17e5122e9e28034c55b2315d3a  hunspell-en_GB-large-2016.01.19.zip"