summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dcccf435325ab298eea6c9a0d4d6ae9a6048137f (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
pkgname=otf-operator-mono-lig
_pkgname=operator-mono-lig
pkgver=2.4.1
pkgrel=1
pkgdesc='Add ligatures to Operator Mono similar to Fira Code'
arch=('x86_64' 'arm64')
url="https://github.com/kiliman/operator-mono-lig"
license=('MIT')
makedepends=(
	'npm'
	'python-fonttools'
	'python2'
)
# markdown license generated using:
# curl https://www.typography.com/requests/policies/eula.json | jq .content.markdown | sed -e 's/^"//' -e 's/"$//' -e 's/\\n/\n/g' > hoefler-co-eula.md
source=(
	"$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
	"hoefler-co-eula.md"
)
sha256sums=('10e9fc495b629bacb8269a8ac08b7231c514d2e1e76561ea3184fc09500f441a'
            '820160042b3a26add024ad21f0cb93e2898d96f4558a6b2cdd0c988c7601eadd')

prepare(){
	cd "${srcdir}/$_pkgname-$pkgver"
	npm i
	rm -rf original/
	ln -s ../../place-your-otfs-here original
}

build() {
	cd "${srcdir}/$_pkgname-$pkgver"
	./build.sh
}

package() {
	mkdir -p "${pkgdir}/usr/share/fonts/OTF/" \
		 "${pkgdir}/usr/share/licenses/otf-operator-mono-lig/"
	install -Dm644 "${srcdir}/hoefler-co-eula.md" \
		      "${pkgdir}/usr/share/licenses/otf-operator-mono-lig/"
	install -Dm644 "${srcdir}/$_pkgname-$pkgver/LICENSE" \
		      "${pkgdir}/usr/share/licenses/otf-operator-mono-lig/"
	find "${srcdir}/$_pkgname-$pkgver/build/" -name *.otf \
		-exec install -Dm644 {} "${pkgdir}/usr/share/fonts/OTF/" ";"
}