summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 30243c0949a8673e671b4e66a9c7ee972b3604bd (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
# Maintainer: Andy Kluger <https://t.me/andykluger>
# Contributor: Markus Weimar <mail@markusweimar.de>
_pkgname=ttf-iosevka-custom
pkgname=${_pkgname}-git
pkgver=1702712905
pkgrel=1
pkgdesc='A slender monospace sans-serif and slab-serif typeface inspired by Pragmata Pro, M+ and PF DIN Mono.'
arch=('any')
url='https://be5invis.github.io/Iosevka/'
license=('custom:OFL')
makedepends=('git' 'nodejs>=12.22.0' 'npm' 'ttfautohint')
depends=()
conflicts=(${_pkgname})
provides=(${_pkgname})
source=('private-build-plans.toml.example')
sha256sums=('06c50b69add84b3bf4fcfdec4b190ef130942440877a0842e3a575d54fe5909e')

prepare () {
  rm -rf Iosevka
  git clone --depth 1 --branch dev 'https://github.com/be5invis/Iosevka'

  buildplans="$HOME/.config/iosevka/private-build-plans.toml"
  if [[ -f "$buildplans" ]]; then
    cp "$buildplans" Iosevka/
  else
    echo ">>> $buildplans not found, using private-build-plans.toml.example"
    cp private-build-plans.toml.example Iosevka/private-build-plans.toml
  fi
}

pkgver () {
  cd Iosevka
  git log -1 --format=%ct
}

build () {
  cd Iosevka
  npm install
  npm update
  NO_COLOR=1 npm run build -- contents::IosevkaCustom
}

package () {
  install -d "${pkgdir}/usr/share/fonts/TTF"
  install -m644 Iosevka/dist/IosevkaCustom/TTF/*.ttf "${pkgdir}/usr/share/fonts/TTF/"
  install -d "${pkgdir}/usr/share/fonts/WOFF2"
  install -m644 Iosevka/dist/IosevkaCustom/WOFF2/*.woff2 "${pkgdir}/usr/share/fonts/WOFF2/"
  printf '%s\n' 'CSS BELOW:'
  cat Iosevka/dist/IosevkaCustom/*.css
  printf '%s\n' 'CSS ABOVE'
  install -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 Iosevka/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/"
}