Name xorg-fonts-encodings
Description X.org font encoding files
Version 1.1.0-1
Package Base xorg-fonts-encodings
Homepage https://gitlab.freedesktop.org/xorg/font/encodings
Maintainers ['Andreas Radke <andyrtr@archlinux.org>']
Contributors ['Jan de Groot <jgc@archlinux.org>']
Distro-repo https://gitlab.archlinux.org/archlinux/packaging/packages/xorg-fonts-encodings
Sources ['https://xorg.freedesktop.org//releases/individual/font/encodings-1.1.0.tar.xz', 'https://xorg.freedesktop.org//releases/individual/font/encodings-1.1.0.tar.xz.sig']
Dependencies []
Optional-Dependencies []
Build-Dependencies ['xorg-mkfontscale', 'xorg-util-macros', 'xorg-font-util', 'meson']
Provides []
Builddate 03-03-2024 13:25:30
Architecture any
Distro-Version
Licenses ['LicenseRef-xorg-fonts-encodings']
Hash 2999e3fe140bc7b0d3b31b48f0ebcabfe6371087024eaf1c8f591785846318b3
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=xorg-fonts-encodings
pkgver=1.1.0
pkgrel=1
pkgdesc="X.org font encoding files"
arch=(any)
url="https://gitlab.freedesktop.org/xorg/font/encodings"
license=('LicenseRef-xorg-fonts-encodings')
makedepends=('xorg-mkfontscale' 'xorg-util-macros' 'xorg-font-util' 'meson')
groups=('xorg-fonts' 'xorg')
options=(!makeflags)
source=(https://xorg.freedesktop.org//releases/individual/font/encodings-${pkgver}.tar.xz{,.sig})
sha512sums=('ae912e120847954f5756193cc8860f50ada6c79bb3ba44f7f0cd1913b13aeed7885e140282cb47989a93fae0a0e8cedebe9a2420f65b1936b40192dc7d208427'
            'SKIP')
#validpgpkeys=('3BB639E56F861FA2E86505690FDD682D974CA72A') # "Matt Turner <mattst88@gmail.com>"
validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith <alan.coopersmith@oracle.com>

build() {
  arch-meson encodings-$pkgver build

  # Print config
  meson configure build

  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"

  install -Dm644 encodings-$pkgver/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"

  # regenerate encodngs file not to include non-compressed versions
  cd "$pkgdir"/usr/share/fonts/encodings/large
  mkfontscale -b -s -l -n -r -p /usr/share/fonts/encodings/large -e . .
  cd "$pkgdir"/usr/share/fonts/encodings/
  mkfontscale -b -s -l -n -r -p /usr/share/fonts/encodings -e . -e large .
}