summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorxiota2023-12-05 16:28:05 -0800
committerxiota2023-12-05 16:28:29 -0800
commite1156d41715511d4e15139a640d24730177557a5 (patch)
treeb9f4ab0e0a99c0c413e8db12f779cad798f3151d /PKGBUILD
downloadaur-e1156d41715511d4e15139a640d24730177557a5.tar.gz
15.0.2.r0
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD71
1 files changed, 71 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9480a068f083
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer:
+
+_fontname="twemoji"
+_pkgname="ttf-$_fontname"
+pkgname="$_pkgname-git"
+pkgver=15.0.2.r0.g6780a94f
+pkgrel=1
+pkgdesc="Unicode emoji color OpenType-SVG font"
+url="https://github.com/jdecked/twemoji"
+license=('CC-BY-4.0' 'MIT')
+arch=('any')
+
+makedepends=(
+ 'fontforge'
+ 'git'
+ 'imagemagick'
+ 'inkscape'
+ 'nodejs'
+ 'potrace'
+ 'python-fonttools'
+ 'python-yaml'
+ 'svgo'
+)
+
+provides=(
+ 'emoji-font'
+ 'ttf-twemoji'
+ 'ttf-twemoji-color'
+)
+conflicts=(
+ 'ttf-twemoji'
+ 'ttf-twemoji-color'
+)
+
+source=(
+ 'jdecked.twemoji'::'git+https://github.com/jdecked/twemoji.git'
+ 'git+https://github.com/13rac1/twemoji-color-font.git'
+ 'git+https://github.com/13rac1/scfbuild.git')
+sha256sums=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+)
+
+pkgver() {
+ cd "jdecked.twemoji"
+ git describe --long --tags --exclude='*[a-zA-Z][a-zA-Z]*' \
+ | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
+}
+
+prepare(){
+ cd "twemoji-color-font"
+ ln -s "$srcdir/scfbuild" SCFBuild
+ sed -i 's/package: regular-package linux-package deb-package macos-package windows-package/package: linux-package/' Makefile
+
+ rm -r "assets/twemoji-svg"
+ mv "$srcdir/jdecked.twemoji/assets/svg" "assets/twemoji-svg"
+}
+
+build(){
+ cd "twemoji-color-font"
+ sed -E 's&^(\s*VERSION :=) [0-9\.]+$&\1 '"${pkgver%%.r*}"'&' -i Makefile
+ make
+}
+
+package(){
+ cd "twemoji-color-font/build/TwitterColorEmoji-SVGinOT-Linux-${pkgver%%.r*}"
+ install -Dm644 "TwitterColorEmoji-SVGinOT.ttf" -t "$pkgdir/usr/share/fonts/TTF/"
+ install -Dm644 LICENSE* -t "$pkgdir/usr/share/licenses/$pkgname/"
+}
+