mkfontscale 1.2.3-1
This commit is contained in:
commit
666927388e
44
PKGBUILD
Normal file
44
PKGBUILD
Normal file
@ -0,0 +1,44 @@
|
||||
# This is an example PKGBUILD file. Use this as a start to creating your own,
|
||||
# and remove these comments. For more information, see 'man PKGBUILD'.
|
||||
# NOTE: Please fill out the license field for your package! If it is unknown,
|
||||
# then please put 'unknown'.
|
||||
|
||||
# Maintainer: Future Linux Team <future_linux@163.com>
|
||||
pkgname=mkfontscale
|
||||
pkgver=1.2.3
|
||||
pkgrel=1
|
||||
pkgdesc="Create an index of scalable font files for X"
|
||||
arch=('x86_64')
|
||||
url="https://gitlab.freedesktop.org/xorg/app/mkfontscale"
|
||||
license=('MIT-open-group' 'X11' 'MIT' 'HPND-sell-variant')
|
||||
groups=('xorg-apps' 'xorg')
|
||||
depends=('freetype2' 'libfontenc' 'zlib' 'glibc')
|
||||
makedepends=('util-macros' 'xorgproto')
|
||||
install=${pkgname}.install
|
||||
source=(https://www.x.org/pub/individual/app/${pkgname}-${pkgver}.tar.xz
|
||||
mkfontscale.hook
|
||||
mkfontscale.script)
|
||||
sha256sums=(2921cdc344f1acee04bcd6ea1e29565c1308263006e134a9ee38cf9c9d6fe75e
|
||||
7e713ad3a2976706c63081204fe29c3bf3414ae5b4dd1de6bd9cb56ce58398be
|
||||
82340327e9820e0713c734b77a8c3033a8b88d19d72e0a23b4123c2b79c3bcb7)
|
||||
|
||||
build() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
${CONFIGURE} \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--disable-static
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
make DESTDIR=${pkgdir} install
|
||||
|
||||
install -Dm644 ${srcdir}/mkfontscale.hook ${pkgdir}/usr/share/libalpm/hooks/mkfontscale.hook
|
||||
install -Dm755 ${srcdir}/mkfontscale.script ${pkgdir}/usr/share/libalpm/scripts/mkfontscale
|
||||
|
||||
}
|
13
mkfontscale.hook
Normal file
13
mkfontscale.hook
Normal file
@ -0,0 +1,13 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Operation = Remove
|
||||
Target = usr/share/fonts/*/
|
||||
Target = !usr/share/fonts/encodings/*
|
||||
|
||||
[Action]
|
||||
Description = Updating X fontdir indices...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/mkfontscale
|
||||
NeedsTargets
|
8
mkfontscale.install
Normal file
8
mkfontscale.install
Normal file
@ -0,0 +1,8 @@
|
||||
post_install() {
|
||||
if [[ -d /usr/share/fonts ]]; then
|
||||
echo -n "Creating X fontdir indices..."
|
||||
find /usr/share/fonts -mindepth 1 -path /usr/share/fonts/encodings -prune \
|
||||
-o -type d -printf '%p/\n' | /usr/share/libalpm/scripts/mkfontscale
|
||||
echo " done."
|
||||
fi
|
||||
}
|
9
mkfontscale.script
Normal file
9
mkfontscale.script
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
sort -r | while read -r d; do
|
||||
[[ -d $d ]] || continue
|
||||
mkfontscale "$d"
|
||||
mkfontdir "$d"
|
||||
find "$d"fonts.{scale,dir} -maxdepth 0 -size -3c -delete
|
||||
rmdir --ignore-fail-on-non-empty "$d"
|
||||
done
|
Loading…
Reference in New Issue
Block a user