2007-01-16 00:12:43 +01:00
|
|
|
#
|
2011-10-12 18:22:10 +02:00
|
|
|
# spec file for package fonts-config
|
2007-01-16 00:12:43 +01:00
|
|
|
#
|
2019-01-19 14:46:59 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:12:43 +01:00
|
|
|
#
|
2009-01-29 23:26:48 +01:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-01-19 14:46:59 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:12:43 +01:00
|
|
|
#
|
|
|
|
|
2011-10-12 18:22:10 +02:00
|
|
|
|
2017-11-24 08:43:06 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
|
|
|
%define _fillupdir /var/adm/fillup-templates
|
|
|
|
%endif
|
|
|
|
|
2007-01-16 00:12:43 +01:00
|
|
|
Name: fonts-config
|
2023-12-11 14:50:51 +01:00
|
|
|
Version: 20231210+git0.f7216ba
|
2012-02-13 13:37:23 +01:00
|
|
|
Release: 0
|
2018-11-05 12:23:16 +01:00
|
|
|
Summary: Script to configure fonts for X Windows and other applications
|
2017-11-24 08:43:06 +01:00
|
|
|
# MIT for infinality
|
2018-04-30 08:20:10 +02:00
|
|
|
License: GPL-2.0-or-later AND MIT
|
2012-02-13 13:37:23 +01:00
|
|
|
Group: System/X11/Fonts
|
2018-12-12 13:30:52 +01:00
|
|
|
Source: %{name}-%{version}.tar.xz
|
2012-08-08 09:12:55 +02:00
|
|
|
BuildRequires: fontconfig
|
|
|
|
BuildRequires: fontpackages-devel
|
|
|
|
Requires(pre): %fillup_prereq
|
2014-01-30 14:46:44 +01:00
|
|
|
%reconfigure_fonts_prereq
|
2023-11-29 08:42:09 +01:00
|
|
|
Requires: fontconfig >= 2.14
|
2014-02-27 10:01:22 +01:00
|
|
|
Requires: gawk
|
2012-08-08 09:12:55 +02:00
|
|
|
Requires: perl(English)
|
2014-01-30 14:46:44 +01:00
|
|
|
Recommends: mkfontscale
|
|
|
|
Recommends: mkfontdir
|
2007-01-16 00:12:43 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-08-08 09:12:55 +02:00
|
|
|
BuildArch: noarch
|
2007-01-16 00:12:43 +01:00
|
|
|
|
|
|
|
%description
|
2018-11-05 12:23:16 +01:00
|
|
|
A script to configure fonts for X Windows and other applications.
|
2007-01-16 00:12:43 +01:00
|
|
|
|
2018-11-05 12:23:16 +01:00
|
|
|
fonts-config is usually called automatically when a package containing
|
|
|
|
fonts is installed, upgraded or removed. But it can also be executed
|
|
|
|
directly, which is mainly useful to debug it (use the --debug flag).
|
2007-01-16 00:12:43 +01:00
|
|
|
|
|
|
|
%prep
|
2023-11-29 08:42:09 +01:00
|
|
|
%autosetup -p1
|
2007-01-16 00:12:43 +01:00
|
|
|
|
|
|
|
%build
|
2014-02-27 10:01:22 +01:00
|
|
|
# empty configuration now, should be filled after fonts-config call
|
2018-12-12 13:30:52 +01:00
|
|
|
cp 99-example.conf 10-rendering-options.conf
|
2014-02-27 10:01:22 +01:00
|
|
|
# empty configuration now, can be filled after fonts-config call
|
2018-12-12 13:30:52 +01:00
|
|
|
cp 99-example.conf 58-family-prefer-local.conf
|
2007-01-16 00:12:43 +01:00
|
|
|
|
|
|
|
%install
|
2012-08-08 09:12:55 +02:00
|
|
|
mkdir -p %{buildroot}/sbin/conf.d
|
|
|
|
mkdir -p %{buildroot}%{_prefix}/sbin
|
2014-02-27 10:01:22 +01:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}
|
2012-08-08 09:12:55 +02:00
|
|
|
mkdir -p %{buildroot}/%{_mandir}/man1
|
2014-02-27 10:01:22 +01:00
|
|
|
mkdir -p %{buildroot}/%{_docdir}/%{name}/infinality
|
2017-11-24 08:43:06 +01:00
|
|
|
mkdir -p %{buildroot}%{_fillupdir}
|
2018-04-30 08:20:10 +02:00
|
|
|
install -m 755 fonts-config %{buildroot}%{_prefix}/sbin
|
|
|
|
install -m 644 sysconfig.fonts-config \
|
2017-11-24 08:43:06 +01:00
|
|
|
%{buildroot}%{_fillupdir}/
|
2018-04-30 08:20:10 +02:00
|
|
|
install -m 644 fontconfig.SUSE.properties.template %{buildroot}%{_datadir}/fonts-config
|
|
|
|
pod2man --section 1 --center=" " fonts-config > \
|
2014-02-27 10:01:22 +01:00
|
|
|
%{buildroot}/%{_mandir}/man1/fonts-config.1
|
2012-06-14 11:52:25 +02:00
|
|
|
#
|
2018-04-30 08:20:10 +02:00
|
|
|
install -m 644 10-rendering-options.conf.template %{buildroot}%{_datadir}/%{name}
|
2014-06-11 11:55:22 +02:00
|
|
|
mkdir -p %{buildroot}%{_fontsconfavaildir}
|
|
|
|
# following two conf files can not be under /usr/share/fonts-config
|
2018-12-12 13:30:52 +01:00
|
|
|
# as they are changed during installation [bnc#882029 (internal)]
|
2014-06-11 11:55:22 +02:00
|
|
|
mkdir -p %{buildroot}%{_fontsconfddir}
|
|
|
|
for conf in 10-rendering-options.conf \
|
|
|
|
58-family-prefer-local.conf; do
|
|
|
|
install -m 644 $conf %{buildroot}%{_fontsconfddir}
|
|
|
|
done
|
|
|
|
#
|
2023-11-29 08:42:09 +01:00
|
|
|
for conf in 11-base-rendering.conf \
|
2014-02-27 10:01:22 +01:00
|
|
|
12-tt-monospace-rendering.conf \
|
|
|
|
13-selective-rendering.conf \
|
|
|
|
13-selective-rendering-ipa.conf \
|
2023-11-29 08:42:09 +01:00
|
|
|
21-emoji-rendering.conf \
|
|
|
|
22-noto-cjk-rendering.conf \
|
|
|
|
31-metric-aliases-bw.conf \
|
|
|
|
32-emoji-reject.conf \
|
|
|
|
32-symbol-substitution.conf \
|
2014-02-27 10:01:22 +01:00
|
|
|
49-family-default.conf \
|
2023-11-29 08:42:09 +01:00
|
|
|
49-family-default-emoji.conf \
|
2016-09-23 11:28:48 +02:00
|
|
|
59-family-prefer-lang-specific.conf \
|
2023-11-29 08:42:09 +01:00
|
|
|
59-family-prefer-lang-specific-cjk.conf \
|
|
|
|
59-family-prefer-lang-specific-noto.conf \
|
2014-02-27 10:01:22 +01:00
|
|
|
60-family-prefer.conf \
|
|
|
|
61-wine-aliases.conf \
|
2018-12-12 13:30:52 +01:00
|
|
|
70-reject.conf; do
|
2014-02-27 10:01:22 +01:00
|
|
|
install -m 644 $conf %{buildroot}%{_datadir}/%{name}/conf.avail/
|
|
|
|
%link_avail_to_system_fontsconf $conf
|
|
|
|
done
|
2023-11-29 08:42:09 +01:00
|
|
|
# missing symlink from fontconfig
|
|
|
|
for conf in 09-autohint-if-no-hinting.conf; do
|
|
|
|
ln -s ../../..%{_datadir}/fontconfig/conf.avail/$conf \
|
|
|
|
%{buildroot}%{_fontsconfddir}/$conf
|
|
|
|
done
|
2007-01-16 00:12:43 +01:00
|
|
|
|
|
|
|
%post
|
2020-06-09 13:18:34 +02:00
|
|
|
if [ -f %{_sysconfdir}/sysconfig/fonts-config ]; then
|
|
|
|
update=$(grep "^FORCE_MODIFY_DEFAULT_FONT_SETTINGS_IN_NEXT_UPDATE=" %{_sysconfdir}/sysconfig/fonts-config | sed -e 's/.*="//;s/"$//')
|
|
|
|
if [ -z "$update" -o "$update" = "yes" ]; then
|
|
|
|
echo "Updating default font settings..."
|
|
|
|
force_hintstyle=$(grep "^FORCE_HINTSTYLE=" /usr/share/fillup-templates/sysconfig.fonts-config | sed -e 's/.*=//')
|
|
|
|
use_lcdfilter=$(grep "^USE_LCDFILTER=" /usr/share/fillup-templates/sysconfig.fonts-config | sed -e 's/.*=//')
|
|
|
|
use_rgba=$(grep "^USE_RGBA=" /usr/share/fillup-templates/sysconfig.fonts-config | sed -e 's/.*=//')
|
|
|
|
if [ ! -f %{_sysconfdir}/sysconfig/fonts-config.rpmsave ]; then
|
|
|
|
cp %{_sysconfdir}/sysconfig/fonts-config %{_sysconfdir}/sysconfig/fonts-config.rpmsave
|
|
|
|
fi
|
|
|
|
sed -i -e '14,16s/^## Default: none$/## Default: '"$force_hintstyle"/ \
|
|
|
|
-e 's/^FORCE_HINTSTYLE="none"$/FORCE_HINTSTYLE='"$force_hintstyle"/ \
|
|
|
|
-e 's/^## Default: lcdnone$/## Default: '"$use_lcdfilter"/ \
|
|
|
|
-e 's/^USE_LCDFILTER="lcdnone"$/USE_LCDFILTER='"$use_lcdfilter"/ \
|
|
|
|
-e '76,78s/^## Default: none$/## Default: '"$use_rgba"/ \
|
|
|
|
-e 's/^USE_RGBA="none"$/USE_RGBA='"$use_rgba"/ \
|
|
|
|
%{_sysconfdir}/sysconfig/fonts-config
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
# Note that the above code should run before fillup merges the (maybe new)
|
|
|
|
# FORCE_MODIFY_DEFAULT_FONT_SETTINGS_IN_NEXT_UPDATE variable
|
|
|
|
# in a system being updated.
|
2007-01-16 00:12:43 +01:00
|
|
|
%{fillup_only -n fonts-config}
|
2014-01-30 14:46:44 +01:00
|
|
|
%reconfigure_fonts_post -c
|
2007-01-16 00:12:43 +01:00
|
|
|
exit 0
|
|
|
|
|
2014-01-30 14:46:44 +01:00
|
|
|
%postun
|
|
|
|
%reconfigure_fonts_postun -c
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
%reconfigure_fonts_posttrans
|
|
|
|
|
2007-01-16 00:12:43 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2014-01-30 14:46:44 +01:00
|
|
|
%dir %{_datadir}/fonts-config
|
|
|
|
%files_fontsconf_availdir
|
2012-08-08 09:12:55 +02:00
|
|
|
%{_sbindir}/fonts-config
|
2014-01-30 14:46:44 +01:00
|
|
|
%{_datadir}/fonts-config/*.template
|
2007-01-16 00:12:43 +01:00
|
|
|
%{_mandir}/man1/fonts-config.1.gz
|
2014-02-27 10:01:22 +01:00
|
|
|
%{_docdir}/%{name}
|
2017-11-24 08:43:06 +01:00
|
|
|
%{_fillupdir}/sysconfig.fonts-config
|
2014-02-27 10:01:22 +01:00
|
|
|
%{_fontsconfavaildir}/*.conf
|
2014-06-11 11:55:22 +02:00
|
|
|
%config %{_fontsconfddir}/*.conf
|
2007-12-18 18:17:49 +01:00
|
|
|
|
2007-03-23 21:20:04 +01:00
|
|
|
%changelog
|