Accepting request 868319 from home:Andreas_Schwab:Factory

- Use rpm.vercmp to compare versions

OBS-URL: https://build.opensuse.org/request/show/868319
OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/ghostscript-fonts-grops?expand=0&rev=19
This commit is contained in:
Takashi Iwai 2021-02-01 13:46:16 +00:00 committed by Git OBS Bridge
parent 5275cc26fb
commit 4b4b2b9bd0
2 changed files with 11 additions and 7 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Feb 1 10:13:58 UTC 2021 - Andreas Schwab <schwab@suse.de>
- Use rpm.vercmp to compare versions
-------------------------------------------------------------------
Mon Sep 28 08:23:56 UTC 2020 - Marguerite Su <i@marguerite.su>

View File

@ -1,7 +1,7 @@
#
# spec file for package ghostscript-fonts-grops
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,14 +12,14 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: ghostscript-fonts-grops
Version: 1.22.2
Release: 0
Url: http://www.gnu.org/software/groff/groff.html
URL: http://www.gnu.org/software/groff/groff.html
Summary: Ghostscript fonts imported to groff for use with grops
License: GPL-2.0-only
Group: Productivity/Publishing/Troff
@ -47,8 +47,7 @@ A version of PostScript® driver for Groff to support characters outside ISO Lat
%build
%define gs_fonts %{_datadir}/ghostscript/fonts
%define gs_version %(gs --version)
%define gs_ver %(gs --version | sed "s/\\.//")
%if %{gs_ver} >= 950
%if %{lua:print(rpm.vercmp(rpm.expand("%{gs_version}"), "9.50"))} >= 0
%define import_font() ln -s -T "%{gs_fonts}/%1.afm" "%2.afm" && gs -P- -dNOSAFER -dNODISPLAY -- pfbtopfa.ps %{gs_fonts}/%1.pfb devps/%1.pfa
%else
%define import_font() ln -s -T "%{gs_fonts}/%1.afm" "%2.afm" && pfbtopfa %{gs_fonts}/%1.pfb devps/%1.pfa