Accepting request 812883 from home:alarrosa:branches:M17N

- Add a _service file
- Add code in %post to check the value of
  FORCE_MODIFY_DEFAULT_FONT_SETTINGS_IN_NEXT_UPDATE and if it's
  set to yes, empty or it doesn't exist, then update the values
  of FORCE_HINTSTYLE, USE_LCDFILTER and USE_RGBA in
  /etc/sysconfig/fonts-config to use the default settings
  established in the 20181211 release (boo#1172022)
- Update to 20200609+git0.42e2b1b:
  * Add variable to allow fonts-config to update default settings
  * Fix en-US, en-GB font matching

OBS-URL: https://build.opensuse.org/request/show/812883
OBS-URL: https://build.opensuse.org/package/show/M17N/fonts-config?expand=0&rev=102
This commit is contained in:
Takashi Iwai 2020-06-09 11:18:34 +00:00 committed by Git OBS Bridge
parent 74721aa2d4
commit ad4f91d00f
5 changed files with 55 additions and 4 deletions

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/openSUSE/fonts-config</param>
<param name="scm">git</param>
<param name="versionformat">%cs+git0.%h</param>
<param name="revision">master</param>
<param name="filename">fonts-config</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:194050f44c4177b09b371e54fff794e0346f6418083bfe92e4a9ad19dba57672
size 28628

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:80fe50de8acb29a1c2f42259f604188e69d1d68d97ef501e50e49081356e2930
size 29544

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Tue Jun 9 09:45:34 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- Add a _service file
- Add code in %post to check the value of
FORCE_MODIFY_DEFAULT_FONT_SETTINGS_IN_NEXT_UPDATE and if it's
set to yes, empty or it doesn't exist, then update the values
of FORCE_HINTSTYLE, USE_LCDFILTER and USE_RGBA in
/etc/sysconfig/fonts-config to use the default settings
established in the 20181211 release (boo#1172022)
- Update to 20200609+git0.42e2b1b:
* Add variable to allow fonts-config to update default settings
* Fix en-US, en-GB font matching
-------------------------------------------------------------------
Sat Jan 19 13:43:32 UTC 2019 - Karl Cheng <qantas94heavy@gmail.com>

View File

@ -22,7 +22,7 @@
%endif
Name: fonts-config
Version: 20190119
Version: 20200609+git0.42e2b1b
Release: 0
Summary: Script to configure fonts for X Windows and other applications
# MIT for infinality
@ -101,6 +101,28 @@ for conf in 10-group-tt-hinted-fonts.conf \
done
%post
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.
%{fillup_only -n fonts-config}
%reconfigure_fonts_post -c
exit 0