diff --git a/_service b/_service
new file mode 100644
index 0000000..1613329
--- /dev/null
+++ b/_service
@@ -0,0 +1,15 @@
+
+
+ https://github.com/openSUSE/fonts-config
+ git
+ %cs+git0.%h
+ master
+ fonts-config
+
+
+ *.tar
+ xz
+
+
+
+
diff --git a/fonts-config-20190119.tar.xz b/fonts-config-20190119.tar.xz
deleted file mode 100644
index f487358..0000000
--- a/fonts-config-20190119.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:194050f44c4177b09b371e54fff794e0346f6418083bfe92e4a9ad19dba57672
-size 28628
diff --git a/fonts-config-20200609+git0.42e2b1b.tar.xz b/fonts-config-20200609+git0.42e2b1b.tar.xz
new file mode 100644
index 0000000..1321861
--- /dev/null
+++ b/fonts-config-20200609+git0.42e2b1b.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:80fe50de8acb29a1c2f42259f604188e69d1d68d97ef501e50e49081356e2930
+size 29544
diff --git a/fonts-config.changes b/fonts-config.changes
index 04eb29b..cb1df41 100644
--- a/fonts-config.changes
+++ b/fonts-config.changes
@@ -1,3 +1,17 @@
+-------------------------------------------------------------------
+Tue Jun 9 09:45:34 UTC 2020 - Antonio Larrosa
+
+- 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
diff --git a/fonts-config.spec b/fonts-config.spec
index bb64f43..33835bf 100644
--- a/fonts-config.spec
+++ b/fonts-config.spec
@@ -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