summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 53fa1a110d8305a7ad419778d4f91a5977812857 (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
# Maintainer: Hugo Osvaldo Barrera <hugo@barrera.io>
#
# Note: This font is propietary. You need to purchase it from the official
# website, and place it in the same directory as this PKGBUILD for it to work.
# This PKGBUILD exists merely for tracking installed font files and running any
# relevant hooks during installation.

pkgname=otf-operator-mono-nerd
pkgver=1.200
pkgdesc="Operator: the non-typewriter typewriter face. Patch with nerd-fonts."
pkgrel=1
arch=('any')
license=('custom:HCo')
url='https://www.typography.com/fonts/operator/overview/'
depends=('fontconfig' 'xorg-font-utils' 'fontforge')
source=("local://OperatorMono-Bold.otf"
        "local://OperatorMono-BoldItalic.otf"
        "local://OperatorMono-Book.otf"
        "local://OperatorMono-BookItalic.otf"
        "local://OperatorMono-Light.otf"
        "local://OperatorMono-LightItalic.otf"
        "local://OperatorMono-Medium.otf"
        "local://OperatorMono-MediumItalic.otf"
        "local://OperatorMono-XLight.otf"
        "local://OperatorMono-XLightItalic.otf")
md5sums=('4e3ca64b09ee0ed95df7f9c834356dd7'
         '79a2c130549d00fb2b1b5fa60233f60d'
         'd49e36f086d6ae880be8ada17f273882'
         '6e2eb8409e2ea9b4552d75c605f81963'
         '0d2e116a74f03ae40bd2d6e5378fe2cf'
         '8223460c7d740a987343efc3399835a5'
         '4694537a06d77cf9e31e295347915121'
         '8419f477f7e0cd6649381ffd776bf07c'
         'a6dc0c1dee9aa75d03d164c6ca9faa4d'
         '1b30b3ad5304495676bdf319d5c5bf49')

build() {
    for font in "${source[@]}"; do
      filename="${font/local:\/\//}"
      nerdfilename=${filename/.otf/-Nerd.otf}

      cp $filename $nerdfilename
      font-patcher $nerdfilename
    done
}

package() {
    # Prepare destination directory
    install -dm 755 "$pkgdir/usr/share/fonts/OTF"

    # Install fonts
    for font in *Nerd*; do
      install -m 644 "$font" "$pkgdir/usr/share/fonts/OTF"
    done;
}