Accepting request 135891 from home:jsmeix:branches:Printing

fixed that it builds again everywhere and not only in openSUSE_Factory since the last careless change

OBS-URL: https://build.opensuse.org/request/show/135891
OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript-fonts?expand=0&rev=5
This commit is contained in:
Johannes Meixner 2012-09-25 13:58:30 +00:00 committed by Git OBS Bridge
parent 8a17507b28
commit d4d224a6bd
2 changed files with 55 additions and 4 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Sep 25 14:58:06 CEST 2012 - jsmeix@suse.de
- Fix the negligent changes done by the below "prepare spec file
for dropping SuSEconfig.fonts" so that it builds again for
all released openSUSE versions (up to 12.2) because only
if suse_version > 1220 one can BuildRequire fontpackages-devel
which provides the RPM macros like reconfigure_fonts_post,
reconfigure_fonts_postun, and reconfigure_fonts_posttrans.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 6 16:40:38 UTC 2012 - pgajdos@suse.com Mon Aug 6 16:40:38 UTC 2012 - pgajdos@suse.com

View File

@ -15,10 +15,13 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: ghostscript-fonts Name: ghostscript-fonts
BuildArch: noarch BuildArch: noarch
# Prepare spec file for dropping SuSEconfig.fonts
# see https://features.opensuse.org/313536
%if 0%{?suse_version} > 1220
BuildRequires: fontpackages-devel BuildRequires: fontpackages-devel
%endif
# t1utils is needed to convert PostScript Type 1 font program data (*.pfb) # t1utils is needed to convert PostScript Type 1 font program data (*.pfb)
# to PostScript (*.pfa) so that ghostscript-fonts-std-8.11.patch can be applied # to PostScript (*.pfa) so that ghostscript-fonts-std-8.11.patch can be applied
# and afterwards back to PostScript Type 1 font program data: # and afterwards back to PostScript Type 1 font program data:
@ -82,13 +85,13 @@ in the package ghostscript-fonts-std.
Optional Fonts for Ghostscript Optional Fonts for Ghostscript
in the package ghostscript-fonts-other. in the package ghostscript-fonts-other.
%package std %package std
Summary: Basic Fonts for Ghostscript Summary: Basic Fonts for Ghostscript
Group: Productivity/Publishing/PS Group: Productivity/Publishing/PS
PreReq: coreutils %suseconfig_fonts_prereq PreReq: coreutils %suseconfig_fonts_prereq
%description std %description std
Several Type 1 basic PostScript fonts. Several Type 1 basic PostScript fonts.
Times, Helvetica, Courier, Symbol, etc. Times, Helvetica, Courier, Symbol, etc.
Contributed by URW++ Design and Development Contributed by URW++ Design and Development
@ -106,7 +109,6 @@ Group: Productivity/Publishing/PS
Requires: ghostscript-fonts-std Requires: ghostscript-fonts-std
%description other %description other
A miscellaneous set including Cyrillic, A miscellaneous set including Cyrillic,
kana, and fonts derived from the free kana, and fonts derived from the free
Hershey fonts, with improvements (such as Hershey fonts, with improvements (such as
@ -116,10 +118,11 @@ from traditional printer or display fonts;
you can read about them in more detail in you can read about them in more detail in
the documentation on Hershey fonts. the documentation on Hershey fonts.
%prep %prep
# Be quiet when unpacking and # Be quiet when unpacking and
# create directory (and change to it) before unpacking Source0 and # create directory (and change to it) before unpacking Source0 and
# additionally unpack Source1 after changing directory # additionally unpack Source1 after changing directory:
%setup -q -c %{name}-%{version} -a 1 %setup -q -c %{name}-%{version} -a 1
%build %build
@ -150,8 +153,15 @@ popd
# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe
# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_post:
%post std %post std
%if 0%{?suse_version} > 1220
%reconfigure_fonts_post %reconfigure_fonts_post
%else
if test -x sbin/conf.d/SuSEconfig.fonts
then %run_suseconfig -m fonts
fi
%endif
if test -x sbin/conf.d/SuSEconfig.pango if test -x sbin/conf.d/SuSEconfig.pango
then %run_suseconfig -m pango then %run_suseconfig -m pango
fi fi
@ -159,21 +169,40 @@ exit 0
# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe
# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_postun:
%postun std %postun std
%if 0%{?suse_version} > 1220
%reconfigure_fonts_postun %reconfigure_fonts_postun
%else
if test -x sbin/conf.d/SuSEconfig.fonts
then %run_suseconfig -m fonts
fi
%endif
if test -x sbin/conf.d/SuSEconfig.pango if test -x sbin/conf.d/SuSEconfig.pango
then %run_suseconfig -m pango then %run_suseconfig -m pango
fi fi
exit 0 exit 0
%if 0%{?suse_version} > 1220
# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe
# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_posttrans:
%posttrans std %posttrans std
%reconfigure_fonts_posttrans %reconfigure_fonts_posttrans
exit 0 exit 0
%endif
# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe
# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_post:
%post other %post other
%if 0%{?suse_version} > 1220
%reconfigure_fonts_post %reconfigure_fonts_post
%else
if test -x sbin/conf.d/SuSEconfig.fonts
then %run_suseconfig -m fonts
fi
%endif
if test -x sbin/conf.d/SuSEconfig.pango if test -x sbin/conf.d/SuSEconfig.pango
then %run_suseconfig -m pango then %run_suseconfig -m pango
fi fi
@ -181,16 +210,28 @@ exit 0
# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe
# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_postun:
%postun other %postun other
%if 0%{?suse_version} > 1220
%reconfigure_fonts_postun %reconfigure_fonts_postun
%else
if test -x sbin/conf.d/SuSEconfig.fonts
then %run_suseconfig -m fonts
fi
%endif
if test -x sbin/conf.d/SuSEconfig.pango if test -x sbin/conf.d/SuSEconfig.pango
then %run_suseconfig -m pango then %run_suseconfig -m pango
fi fi
exit 0 exit 0
%if 0%{?suse_version} > 1220
# Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe
# see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
# Only if suse_version > 1220 it BuildRequires fontpackages-devel which provides reconfigure_fonts_posttrans:
%posttrans other %posttrans other
%reconfigure_fonts_posttrans %reconfigure_fonts_posttrans
exit 0 exit 0
%endif
%files %files
%defattr(-, root, root) %defattr(-, root, root)