Accepting request 724711 from home:WernerFink:branches:Printing

- Use update-alternatives to get the real ghostscript binary from
  /usr/bin/gs to /usr/bin/gs.bin and allow the gswrap package to
  use this with ist wrapper script

- Use update-alternatives to get the real ghostscript binary from
  /usr/bin/gs to /usr/bin/gs.bin and allow the gswrap package to
  use this with ist wrapper script

OBS-URL: https://build.opensuse.org/request/show/724711
OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript?expand=0&rev=115
This commit is contained in:
Dr. Werner Fink 2019-08-20 10:24:25 +00:00 committed by Git OBS Bridge
parent 913dde5df3
commit 83629d3344
4 changed files with 54 additions and 2 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Aug 13 12:38:45 UTC 2019 - Dr. Werner Fink <werner@suse.de>
- Use update-alternatives to get the real ghostscript binary from
/usr/bin/gs to /usr/bin/gs.bin and allow the gswrap package to
use this with ist wrapper script
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Apr 4 14:37:09 CEST 2019 - jsmeix@suse.de Thu Apr 4 14:37:09 CEST 2019 - jsmeix@suse.de

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # 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/
# #
@ -24,12 +24,15 @@ BuildRequires: libpng-devel
BuildRequires: libtiff-devel BuildRequires: libtiff-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: update-alternatives
BuildRequires: zlib-devel BuildRequires: zlib-devel
%if 0%{?suse_version} >= 1500 %if 0%{?suse_version} >= 1500
BuildRequires: apparmor-abstractions BuildRequires: apparmor-abstractions
BuildRequires: apparmor-rpm-macros BuildRequires: apparmor-rpm-macros
Requires: apparmor-abstractions Requires: apparmor-abstractions
%endif %endif
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: Minimal Ghostscript for minimal build requirements Summary: Minimal Ghostscript for minimal build requirements
License: AGPL-3.0-only License: AGPL-3.0-only
Group: System/Libraries Group: System/Libraries
@ -321,19 +324,35 @@ set -x
install -m 644 catalog.devices $DOCDIR install -m 644 catalog.devices $DOCDIR
install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/apparmor.d/ghostscript install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/apparmor.d/ghostscript
# Move /usr/bin/gs to /usr/bin/gs.bin to be able to use update-alternatives
install -d %buildroot%{_sysconfdir}/alternatives
mv %{buildroot}%{_bindir}/gs %{buildroot}%{_bindir}/gs.bin
ln -sf %{_bindir}/gs.bin %{buildroot}%{_sysconfdir}/alternatives/gs
ln -sf %{_sysconfdir}/alternatives/gs %{buildroot}%{_bindir}/gs
%post %post
/sbin/ldconfig /sbin/ldconfig
%if 0%{?suse_version} >= 1500 %if 0%{?suse_version} >= 1500
%apparmor_reload /etc/apparmor.d/ghostscript %apparmor_reload /etc/apparmor.d/ghostscript
%endif %endif
%{_sbindir}/update-alternatives \
--install %{_bindir}/gs gs %{_bindir}/gs.bin 15
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%preun
if test $1 -eq 0 ; then
%{_sbindir}/update-alternatives \
--remove gs %{_bindir}/gs.bin
fi
%files %files
%defattr(-, root, root) %defattr(-, root, root)
%ghost %config %{_sysconfdir}/alternatives/gs
%{_bindir}/dvipdf %{_bindir}/dvipdf
%{_bindir}/eps2eps %{_bindir}/eps2eps
%{_bindir}/gs %{_bindir}/gs
%{_bindir}/gs.bin
%{_bindir}/gsbj %{_bindir}/gsbj
%{_bindir}/gsdj %{_bindir}/gsdj
%{_bindir}/gsdj500 %{_bindir}/gsdj500

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Aug 13 12:38:45 UTC 2019 - Dr. Werner Fink <werner@suse.de>
- Use update-alternatives to get the real ghostscript binary from
/usr/bin/gs to /usr/bin/gs.bin and allow the gswrap package to
use this with ist wrapper script
------------------------------------------------------------------- -------------------------------------------------------------------
Wed May 8 08:46:43 UTC 2019 - jsegitz@suse.com Wed May 8 08:46:43 UTC 2019 - jsegitz@suse.com

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # 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/
# #
@ -42,6 +42,7 @@ BuildRequires: libpng-devel
BuildRequires: libtiff-devel BuildRequires: libtiff-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: update-alternatives
BuildRequires: xorg-x11-devel BuildRequires: xorg-x11-devel
BuildRequires: xorg-x11-fonts BuildRequires: xorg-x11-fonts
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -50,6 +51,8 @@ BuildRequires: apparmor-abstractions
BuildRequires: apparmor-rpm-macros BuildRequires: apparmor-rpm-macros
Requires: apparmor-abstractions Requires: apparmor-abstractions
%endif %endif
Requires(post): update-alternatives
Requires(preun): update-alternatives
Summary: The Ghostscript interpreter for PostScript and PDF Summary: The Ghostscript interpreter for PostScript and PDF
License: AGPL-3.0-only License: AGPL-3.0-only
Group: System/Libraries Group: System/Libraries
@ -457,19 +460,35 @@ set -x
install -m 644 catalog.devices $DOCDIR install -m 644 catalog.devices $DOCDIR
install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/apparmor.d/ghostscript install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/apparmor.d/ghostscript
# Move /usr/bin/gs to /usr/bin/gs.bin to be able to use update-alternatives
install -d %buildroot%{_sysconfdir}/alternatives
mv %{buildroot}%{_bindir}/gs %{buildroot}%{_bindir}/gs.bin
ln -sf %{_bindir}/gs.bin %{buildroot}%{_sysconfdir}/alternatives/gs
ln -sf %{_sysconfdir}/alternatives/gs %{buildroot}%{_bindir}/gs
%post %post
/sbin/ldconfig /sbin/ldconfig
%if 0%{?suse_version} >= 1500 %if 0%{?suse_version} >= 1500
%apparmor_reload /etc/apparmor.d/ghostscript %apparmor_reload /etc/apparmor.d/ghostscript
%endif %endif
%{_sbindir}/update-alternatives \
--install %{_bindir}/gs gs %{_bindir}/gs.bin 15
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%preun
if test $1 -eq 0 ; then
%{_sbindir}/update-alternatives \
--remove gs %{_bindir}/gs.bin
fi
%files %files
%defattr(-, root, root) %defattr(-, root, root)
%ghost %config %{_sysconfdir}/alternatives/gs
%{_bindir}/dvipdf %{_bindir}/dvipdf
%{_bindir}/eps2eps %{_bindir}/eps2eps
%{_bindir}/gs %{_bindir}/gs
%{_bindir}/gs.bin
%{_bindir}/gsbj %{_bindir}/gsbj
%{_bindir}/gsdj %{_bindir}/gsdj
%{_bindir}/gsdj500 %{_bindir}/gsdj500