summaryrefslogtreecommitdiff
path: root/repo/font-noto/font-noto.xibuild
blob: 5679ef00d9f0b9995982428d26275063661fb03a (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
#!/bin/sh

NAME="font-noto"
DESC="Noto font families for Latin, Cyrillic and Greek scripts"

MAKEDEPS="make ruby"
DEPS="fontconfig "

PKG_VER=0_git20211101
BRANCH=364fb14e20f82887280f103f638ff6450dbfc525
SOURCE="https://github.com/googlefonts/noto-fonts/archive/$BRANCH/noto-fonts-$BRANCH.tar.gz"
ADDITIONAL="noto-meta.json noto-meta fontconfig.xml.erb 58-noto-math.xml "

prepare () {
    chmod +x ./noto-meta
}

build () {
    ./noto-meta gen-font-confs conf.d/
}

package () {
    for f in hinted/ttf/*/*.ttf; do 
        install -D -m644  $f "$PKG_DEST/usr/share/fonts/noto"
    done

    for f in conf.d/*.xml; do 
        install -D -m644 $f "$PKG_DEST"/etc/fonts/conf.avail/
    done

	cd "$PKG_DEST"

	mkdir -p etc/fonts/conf.d
	local f; for f in etc/fonts/conf.avail/*.xml; do
		ln -s ../conf.avail/${f##*/} "$PKG_DEST"/etc/fonts/conf.d/${f##*/}
	done
}