summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 441ce9d9a67460f90bd92e3d1371473efb753756 (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
# Maintainer: Attila Fidan <archlinux-buildsystem@print0.net>

pkgname=ttf-twemoji-color-git
_gitname=twemoji-color-font
pkgver=14.0.2.r2.g80a6926
pkgrel=1
epoch=1

pkgdesc="Color and B&W SVGinOT builds of Twemoji"
url="https://github.com/13rac1/twemoji-color-font"
license=(
  CC-BY-4.0
  MIT
)
arch=(any)

source=(
  "git+$url.git#branch=main"
  "git+https://github.com/13rac1/scfbuild.git#branch=master"
)
b2sums=('SKIP'
        'SKIP')

makedepends=(
  fontforge
  git
  inkscape
  imagemagick
  nodejs
  potrace
  python-fonttools
  python-setuptools
  python-yaml
  svgo
)

provides=(
  emoji-font
  ttf-twemoji-color
  twemoji-color-font
)
conflicts=(
  ttf-twemoji-color
  twemoji-color-font
)

pkgver() {
  cd "$_gitname"
  git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare(){
  cd "$_gitname"
  rm SCFBuild
  ln -s "${srcdir}"/scfbuild SCFBuild
  sed -i 's/package: regular-package linux-package deb-package macos-package windows-package/package: linux-package/' Makefile
}

build(){
  cd "$_gitname"
  make
}

package(){
  cd "$_gitname"/build/TwitterColorEmoji-SVGinOT-Linux-14.0.2
  install -Dm644 TwitterColorEmoji-SVGinOT.ttf -t "$pkgdir/usr/share/fonts/TTF/"
  install -Dm644 LICENSE* -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}