aboutsummaryrefslogtreecommitdiffstats
path: root/community/font-noto/APKBUILD
blob: 2b4d21db9c4a7fc06d68735226137324880b0709 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=font-noto
pkgver=0_git20190623
_commit=462ad2d2a45df33785980f9d9f56f6369cfc110d
pkgrel=3
pkgdesc="Google's font family that aims to support all the world's languages"
url="https://github.com/googlei18n/noto-fonts/"
arch="noarch"
license="OFL-1.1"
depends="fontconfig"
options="!check" # No test suite
source="https://github.com/googlei18n/noto-fonts/archive/$_commit/noto-fonts-$_commit.tar.gz"
builddir="$srcdir/noto-fonts-$_commit"
#
# NOTE: sort list by string length >
# to prevent find doing partial matching
#
_langs="
	egyptianhieroglyphs
	adlamunjoined
	glagolitic
	devanagari
	oldturkic
	malayalam
	cuneiform
	tifinagh
	gurmukhi
	gujarati
	georgian
	ethiopic
	cherokee
	armenian
	tibetan
	sinhala
	shavian
	osmanya
	olchiki
	myanmar
	mandaic
	kayahli
	kannada
	deseret
	cypriot
	bengali
	avestan
	thaana
	telugu
	hebrew
	gothic
	chakma
	carian
	arabic
	tamil
	osage
	oriya
	khmer
	buhid
	bamum
	adlam
	thai
	lisu
	vai
	nko
	lao
	"
for _lang in $_langs; do
	subpackages="$subpackages $pkgname-$_lang:_split"
done
subpackages="$subpackages font-croscore:croscore $pkgname-extra $pkgname-all:noto_all"

package() {
	mkdir -p "$pkgdir"/usr/share/fonts/noto
	install -m644 "$builddir"/hinted/*.ttf \
		"$pkgdir"/usr/share/fonts/noto/
}

extra()	{
	pkgdesc="$pkgdesc (additional variants)"
	mkdir -p "$subpkgdir"/usr/share/fonts/noto
	local font
	for font in Condensed SemiBold Extra; do
		mv "$pkgdir"/usr/share/fonts/noto/*${font}*.ttf \
			"$subpkgdir"/usr/share/fonts/noto
	done
}

croscore() {
	pkgdesc="Chrome OS core fonts"
	mkdir -p "$subpkgdir"/usr/share/fonts/noto
	local font
	for font in Arimo Cousine Tinos; do
		mv "$pkgdir"/usr/share/fonts/noto/${font}*.ttf \
			"$subpkgdir"/usr/share/fonts/noto
	done
}

_split() {
	local lang=${subpkgname##*-}
	pkgdesc="$pkgdesc ($lang)"
	mkdir -p "$subpkgdir"/usr/share/fonts/noto
	find "$pkgdir"/usr/share/fonts/noto \
		-iname "Noto*${lang}*.ttf" -exec \
		mv {} "$subpkgdir"/usr/share/fonts/noto \;
}

noto_all() {
	pkgdesc="$pkgdesc (meta package)"
	mkdir -p "$subpkgdir"
	depends="$pkgname font-croscore $pkgname-extra"
	for _lang in $_langs; do
		depends="$depends $pkgname-$_lang"
	done
}

sha512sums="6e96e8b5ac06ea938a92fdec8d9354796794125db03c82ca2219eb66105b03c303745d1a8b60ed711c365fc115971ad8a5e7096957803c7d2d95b8accd46719e  noto-fonts-462ad2d2a45df33785980f9d9f56f6369cfc110d.tar.gz"