aboutsummaryrefslogtreecommitdiffstats
path: root/main/aspell/APKBUILD
blob: 92cc7a92e310b6419e27d73bc2439297b163fbe2 (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
77
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
pkgname=aspell
pkgver=0.60.8
pkgrel=1
pkgdesc="A spell checker designed to eventually replace Ispell"
url="http://aspell.net/"
arch="all"
license="LGPL-2.0-or-later"
subpackages="$pkgname-compat::noarch $pkgname-utils $pkgname-dev $pkgname-doc
	$pkgname-lang $pkgname-libs"
depends_dev="$pkgname-utils"
makedepends="ncurses-dev perl gettext-dev"
source="https://ftp.gnu.org/gnu/aspell/aspell-$pkgver.tar.gz
	CVE-2019-25051.patch"

# secfixes:
#   0.60.8-r1:
#     - CVE-2019-25051
#   0.60.8-r0:
#     - CVE-2019-17544

prepare() {
	default_prepare
	update_config_sub
}

build() {
	cd "$builddir"
	LDFLAGS="-lintl" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-dict-dir=/usr/share/$pkgname \
		--enable-pkgdatadir=/usr/share/$pkgname \
		--enable-compile-in-filters
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

compat() {
	pkgdesc="aspell compatibility scripts for ispell and unix spell"
	depends="$pkgname"
	install -d "$subpkgdir"/usr/bin
	cd "$pkgdir"/usr/share/$pkgname
	mv spell ispell "$subpkgdir"/usr/bin/
}

utils() {
	pkgdesc="aspell misc utils"
	depends="$pkgname perl"
	install -d "$subpkgdir"/usr/bin
	cd "$pkgdir"/usr/bin
	mv pre* aspell-import run-with-aspell word-list-compress "$subpkgdir"/usr/bin/
}

libs() {
	default_libs
	mv "$pkgdir"/usr/share "$subpkgdir"/usr
	rm -fr "$pkgdir"/usr/lib
}

sha512sums="
8ef4952c553b6234dfe777240d2d97beb13ef9201e18d56bee3b5068d13525db3625b7130d9f5122f7c529da0ccb0c70eb852a81472a7d15fb7c4ee5ba21cd29  aspell-0.60.8.tar.gz
529f3f4737d2e19f7571f4c8666b1cd089cc4e9dfdaa52dc468919f01ce9f8f8112d8fe8afda295b3dfb92f5e0c2bbd79bf1ec69f06c163c32eb28f0168ab263  CVE-2019-25051.patch
"