[arch-commits] Commit in xorg-mkfontdir/trunk (4 files)
Jan Steffens
heftig at archlinux.org
Fri Jan 13 20:57:03 UTC 2017
Date: Friday, January 13, 2017 @ 20:57:02
Author: heftig
Revision: 286216
1.0.7-6
Added:
xorg-mkfontdir/trunk/xorg-mkfontdir.install
xorg-mkfontdir/trunk/xorg-mkfontdir.script
Modified:
xorg-mkfontdir/trunk/PKGBUILD (contents, properties)
xorg-mkfontdir/trunk/xorg-mkfontdir.hook
------------------------+
PKGBUILD | 20 ++++++++++++--------
xorg-mkfontdir.hook | 13 +++----------
xorg-mkfontdir.install | 7 +++++++
xorg-mkfontdir.script | 9 +++++++++
4 files changed, 31 insertions(+), 18 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-01-13 20:21:41 UTC (rev 286215)
+++ PKGBUILD 2017-01-13 20:57:02 UTC (rev 286216)
@@ -3,28 +3,32 @@
pkgname=xorg-mkfontdir
pkgver=1.0.7
-pkgrel=5
+pkgrel=6
pkgdesc="Create an index of X font files in a directory"
arch=(any)
url="http://xorg.freedesktop.org/"
license=('custom')
-depends=('sh' 'xorg-mkfontscale')
+depends=('bash' 'xorg-mkfontscale')
makedepends=('xorg-util-macros')
groups=('xorg' 'xorg-apps')
+install=xorg-mkfontdir.install
source=(http://xorg.freedesktop.org/archive/individual/app/mkfontdir-${pkgver}.tar.bz2
- xorg-mkfontdir.hook)
-sha1sums=('3c06dad8a5fbf7362b51fb7d6b1ab805eba40336'
- '67eaa9c5948ad6ac09464d24246f60b0c6b82f2c')
+ xorg-mkfontdir.hook
+ xorg-mkfontdir.script)
+sha256sums=('56d52a482df130484e51fd066d1b6eda7c2c02ddbc91fe6e2be1b9c4e7306530'
+ 'df6f71601b2be5161bb8e980acee753d6ef86d71221f61627422bcbe87ed09cd'
+ '06c60e3e46a76b5300c3224cea6b5094556ea712a08ff9a0103be2eb58d222b5')
build() {
- cd "${srcdir}/mkfontdir-${pkgver}"
+ cd mkfontdir-${pkgver}
./configure --prefix=/usr
make
}
package() {
- cd "${srcdir}/mkfontdir-${pkgver}"
+ cd mkfontdir-${pkgver}
make DESTDIR="${pkgdir}" install
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
- install -Dm644 $srcdir/xorg-mkfontdir.hook "${pkgdir}/usr/share/libalpm/hooks/xorg-mkfontdir.hook"
+ install -Dm644 ../xorg-mkfontdir.hook "${pkgdir}/usr/share/libalpm/hooks/xorg-mkfontdir.hook"
+ install -D ../xorg-mkfontdir.script "${pkgdir}/usr/share/libalpm/scripts/xorg-mkfontdir"
}
Property changes on: xorg-mkfontdir/trunk/PKGBUILD
___________________________________________________________________
Modified: svn:keywords
## -1 +1 ##
-Id Revision
\ No newline at end of property
+Id
\ No newline at end of property
Modified: xorg-mkfontdir.hook
===================================================================
--- xorg-mkfontdir.hook 2017-01-13 20:21:41 UTC (rev 286215)
+++ xorg-mkfontdir.hook 2017-01-13 20:57:02 UTC (rev 286216)
@@ -3,17 +3,10 @@
Operation = Install
Operation = Upgrade
Operation = Remove
-Target = usr/share/fonts/*/*.bdf
-Target = usr/share/fonts/*/*.otf
-Target = usr/share/fonts/*/*.pcf.gz
-Target = usr/share/fonts/*/*.pfa
-Target = usr/share/fonts/*/*.pfb
-Target = usr/share/fonts/*/*.ttc
-Target = usr/share/fonts/*/*.ttf
-Target = usr/share/fonts/*/*.woff
+Target = usr/share/fonts/*/
[Action]
-Description = Creating index of X font files...
+Description = Updating X fontdir indices...
When = PostTransaction
-Exec = /bin/sh -c 'while read -r f; do dirname $f; done | uniq | while read -r d; do mkfontscale /$d && mkfontdir /$d; done'
+Exec = /usr/share/libalpm/scripts/xorg-mkfontdir
NeedsTargets
Added: xorg-mkfontdir.install
===================================================================
--- xorg-mkfontdir.install (rev 0)
+++ xorg-mkfontdir.install 2017-01-13 20:57:02 UTC (rev 286216)
@@ -0,0 +1,7 @@
+post_install() {
+ if [[ -d /usr/share/fonts ]]; then
+ echo -n "Creating X fontdir indices..."
+ find /usr/share/fonts -mindepth 1 -type d | /usr/share/libalpm/scripts/xorg-mkfontdir
+ echo " done."
+ fi
+}
Added: xorg-mkfontdir.script
===================================================================
--- xorg-mkfontdir.script (rev 0)
+++ xorg-mkfontdir.script 2017-01-13 20:57:02 UTC (rev 286216)
@@ -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
More information about the arch-commits
mailing list