Accepting request 373365 from M17N:fonts

- fix previous commit

- Update reconfigure_fonts_post to use shell variables
  to reduce build-compare noise in font packages

OBS-URL: https://build.opensuse.org/request/show/373365
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fontpackages?expand=0&rev=14
This commit is contained in:
Dominique Leuenberger 2016-03-29 07:53:58 +00:00 committed by Git OBS Bridge
commit f445aefb59
3 changed files with 36 additions and 22 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Mar 14 14:30:28 UTC 2016 - pgajdos@suse.com
- fix previous commit
-------------------------------------------------------------------
Mon Mar 7 15:36:53 UTC 2016 - olaf@aepfle.de
- Update reconfigure_fonts_post to use shell variables
to reduce build-compare noise in font packages
-------------------------------------------------------------------
Wed Oct 21 09:27:48 UTC 2015 - dmueller@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package fontpackages
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed

View File

@ -7,10 +7,6 @@
%_fontsconfavaildir %{_datadir}/%{name}/conf.avail
# private
%__fontsconfigrunflag %{_rundir}/fontpackages/reconfigure-fonts
# The pattern is fixed within libzypp:
# /var/adm/update-scripts/name-version-release-anything
%__fontsupdatescript /var/adm/update-scripts/%{name}-%{version}-%{release}-reconfigure-fonts
%__fontsupdatescript_cjk /var/adm/update-scripts/%{name}-%{version}-%{release}-reconfigure-cjk-fonts
# macro: link_avail_to_system_fontsconf name
# (takes exactly one argument, name of configuration file)
@ -105,6 +101,9 @@ Requires(posttrans): coreutils \
# options:
# -c (the fonts are CJK fonts, also do setup which is only needed
# for CJK)
# The pattern is fixed within libzypp:
# /var/adm/update-scripts/name-version-release-anything
# (place version-release at the end of a line to help build-compare)
%reconfigure_fonts_post(c) \
mkdir -p `dirname %{__fontsconfigrunflag}` \
touch %{__fontsconfigrunflag} \
@ -112,24 +111,28 @@ Requires(posttrans): coreutils \
touch %{__fontsconfigrunflag}-cjk \
} \
if [ -n "$ZYPP_IS_RUNNING" ]; then \
echo 'if [ -e %{__fontsconfigrunflag} ]; then' > %{__fontsupdatescript} \
echo ' if [ -x /usr/sbin/fonts-config ]; then' >> %{__fontsupdatescript} \
echo ' /usr/sbin/fonts-config --quiet' >> %{__fontsupdatescript} \
echo ' fi' >> %{__fontsupdatescript} \
echo ' rm %{__fontsconfigrunflag}' >> %{__fontsupdatescript} \
echo 'fi' >> %{__fontsupdatescript} \
echo 'rm %{__fontsupdatescript}' >> %{__fontsupdatescript} \
__fontsupdatescript=/var/adm/update-scripts/%{name}-%{version}-%{release}\
__fontsupdatescript="${__fontsupdatescript}-reconfigure-fonts" \
echo 'if [ -e %{__fontsconfigrunflag} ]; then' > "${__fontsupdatescript}" \
echo ' if [ -x /usr/sbin/fonts-config ]; then' >> "${__fontsupdatescript}" \
echo ' /usr/sbin/fonts-config --quiet' >> "${__fontsupdatescript}" \
echo ' fi' >> "${__fontsupdatescript}" \
echo ' rm %{__fontsconfigrunflag}' >> "${__fontsupdatescript}" \
echo 'fi' >> "${__fontsupdatescript}" \
echo "rm ${__fontsupdatescript}" >> "${__fontsupdatescript}" \
%{-c: \
echo 'if [ -e %{__fontsconfigrunflag}-cjk ]; then' > %{__fontsupdatescript_cjk} \
echo ' if [ -x /usr/sbin/acroread-cidfont-config ]; then' >> %{__fontsupdatescript_cjk} \
echo ' /usr/sbin/acroread-cidfont-config' >> %{__fontsupdatescript_cjk} \
echo ' fi' >> %{__fontsupdatescript_cjk} \
echo ' if [ -x /usr/sbin/ghostscript-cjk-config ]; then' >> %{__fontsupdatescript_cjk} \
echo ' /usr/sbin/ghostscript-cjk-config' >> %{__fontsupdatescript_cjk} \
echo ' fi' >> %{__fontsupdatescript_cjk} \
echo ' rm %{__fontsconfigrunflag}-cjk' >> %{__fontsupdatescript_cjk} \
echo 'fi' >> %{__fontsupdatescript_cjk} \
echo 'rm %{__fontsupdatescript_cjk}' >> %{__fontsupdatescript_cjk} \
__fontsupdatescript_cjk=/var/adm/update-scripts/%{name}-%{version}-%{release}\
__fontsupdatescript_cjk="${__fontsupdatescript_cjk}-reconfigure-cjk-fonts" \
echo 'if [ -e %{__fontsconfigrunflag}-cjk ]; then' > "${__fontsupdatescript_cjk}" \
echo ' if [ -x /usr/sbin/acroread-cidfont-config ]; then' >> "${__fontsupdatescript_cjk}" \
echo ' /usr/sbin/acroread-cidfont-config' >> "${__fontsupdatescript_cjk}" \
echo ' fi' >> "${__fontsupdatescript_cjk}" \
echo ' if [ -x /usr/sbin/ghostscript-cjk-config ]; then' >> "${__fontsupdatescript_cjk}" \
echo ' /usr/sbin/ghostscript-cjk-config' >> "${__fontsupdatescript_cjk}" \
echo ' fi' >> "${__fontsupdatescript_cjk}" \
echo ' rm %{__fontsconfigrunflag}-cjk' >> "${__fontsupdatescript_cjk}" \
echo 'fi' >> "${__fontsupdatescript_cjk}" \
echo "rm ${__fontsupdatescript_cjk}" >> "${__fontsupdatescript_cjk}" \
} \
fi \
%nil