- Add xorg-x11-fonts-update-dirs, a script to automake mkfontscale and
friends as well as generate encodings directories during %post (used by xorg-x11-fonts). (#634039)
This commit is contained in:
parent
d31c77ee35
commit
6b02c90ab1
@ -6,7 +6,7 @@ Name: xorg-x11-%{pkgname}
|
||||
# IMPORTANT: If package ever gets renamed to something else, remove the Epoch line!
|
||||
Epoch: 1
|
||||
Version: 7.5
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
URL: http://www.x.org
|
||||
@ -17,6 +17,8 @@ Source1: ftp://ftp.x.org/pub/individual/app/fonttosfnt-1.0.3.tar.bz2
|
||||
Source2: ftp://ftp.x.org/pub/individual/app/mkfontdir-1.0.6.tar.bz2
|
||||
Source3: ftp://ftp.x.org/pub/individual/app/mkfontscale-%{mkfontscale}.tar.bz2
|
||||
Source4: ftp://ftp.x.org/pub/individual/font/font-util-1.2.0.tar.bz2
|
||||
# helper script used in %post for xorg-x11-fonts
|
||||
Source5: xorg-x11-fonts-update-dirs
|
||||
|
||||
Patch0: font-util-1.0.1-mapdir-use-datadir-fix.patch
|
||||
Patch1: font-util-1.0.1-autoconf-add-with-fontdir-option.patch
|
||||
@ -93,6 +95,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
cp font-util-*/COPYING COPYING-bdftruncate
|
||||
}
|
||||
|
||||
install -m 744 %{SOURCE5} ${RPM_BUILD_ROOT}%{_bindir}/xorg-x11-fonts-update-dirs
|
||||
sed -i "s:@DATADIR@:%{_datadir}:" ${RPM_BUILD_ROOT}%{_bindir}/xorg-x11-fonts-update-dirs
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
@ -104,6 +109,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_bindir}/mkfontdir
|
||||
%{_bindir}/mkfontscale
|
||||
%{_bindir}/ucs2any
|
||||
%{_bindir}/xorg-x11-fonts-update-dirs
|
||||
%dir %{_datadir}/X11/fonts
|
||||
%dir %{_datadir}/X11/fonts/util
|
||||
%{_datadir}/X11/fonts/util/map-*
|
||||
@ -123,6 +129,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Nov 19 2010 Peter Hutterer <peter.hutterer@redhat.com> 1:7.5-3
|
||||
- Add xorg-x11-fonts-update-dirs, a script to automake mkfontscale and
|
||||
friends as well as generate encodings directories during %post (used by
|
||||
xorg-x11-fonts). (#634039)
|
||||
|
||||
* Mon Nov 08 2010 Peter Hutterer <peter.hutterer@redhat.com> 1:7.5-2
|
||||
- mkfontdir 1.0.6
|
||||
|
||||
|
59
xorg-x11-fonts-update-dirs
Executable file
59
xorg-x11-fonts-update-dirs
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/sh
|
||||
# This script is used by the xorg-x11-fonts package in the %post stage for
|
||||
# some fonts to generate the right encodings.
|
||||
|
||||
fontdir=""
|
||||
encodingsdir="@DATADIR@/X11/fonts/encodings"
|
||||
|
||||
# some fonts need to skip mkfontscale, set to "yes" to skip
|
||||
skip_fontscale=""
|
||||
# some fonts need to run ttmkfdir, set to "yes" to run
|
||||
need_ttmkfdir=""
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Need at least one parameter for font dir."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while [ $# != 0 ]; do
|
||||
case $1 in
|
||||
--skip-fontscale)
|
||||
skip_fontscale="yes"
|
||||
;;
|
||||
--need-ttmkfdir)
|
||||
need_ttmkfdir="yes"
|
||||
;;
|
||||
--encodingsdir)
|
||||
shift
|
||||
encodingsdir="$1"
|
||||
;;
|
||||
*)
|
||||
fontdir="$1"
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
echo "Too many parameters."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "$skip_fontscale" != "yes" ]; then
|
||||
mkfontscale $fontdir
|
||||
fi
|
||||
if [ "$need_ttmkfdir" != "yes" ]; then
|
||||
ttmkfdir $fontdir
|
||||
fi
|
||||
|
||||
mkfontdir $fontdir
|
||||
fc-cache $fontdir
|
||||
|
||||
if ! [ -z "$encodingsdir" ]; then
|
||||
[ -d "$encodingsdir" ] || mkdir -p "$encodingsdir"
|
||||
pushd "$encodingsdir"
|
||||
mkfontscale -n -e "$encodingsdir" -e "$encodingsdir/large"
|
||||
popd
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user