remove gimp plugin for eln, put an explicit build requirement for GTK2

gtk2-devel was an implicit requirement via gimp till now
This commit is contained in:
Zdenek Dohnal 2021-01-14 08:18:06 +01:00
parent 0ca5b5d035
commit 6b253127dc

View File

@ -10,7 +10,7 @@
Name: xsane
Summary: X Window System front-end for the SANE scanner interface
Version: 0.999
Release: 38%{?dist}
Release: 39%{?dist}
Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz
Source1: xsane-256x256.png
# use "xdg-open" instead of "netscape" to launch help browser
@ -76,7 +76,10 @@ URL: http://www.xsane.org/
BuildRequires: gcc
# uses make
BuildRequires: make
%if 0%{?rhel} <= 8 || 0%{?fedora}
BuildRequires: gimp-devel
%endif
BuildRequires: gtk2-devel
BuildRequires: lcms2-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
@ -93,6 +96,7 @@ library, which provides access to scanners, digital cameras, and other
capture devices. XSane is written in GTK+ and provides control for
performing the scan and then manipulating the captured image.
%if 0%{?rhel} <= 8 || 0%{?fedora}
%package gimp
Summary: GIMP plug-in providing the SANE scanner interface
Requires: gimp >= 2:2.2.12-4
@ -102,6 +106,7 @@ Requires: xsane-common
This package provides the regular XSane frontend for the SANE scanner
interface, but it works as a GIMP plug-in. You must have GIMP
installed to use this package.
%endif
%package common
Summary: Common files for xsane packages
@ -148,10 +153,12 @@ mkdir build-without-gimp
CFLAGS='%optflags -fno-strict-aliasing -DXSANE_BUGTRACKER_URL=\"%{bugtracker_url}\"'
export CFLAGS
%if 0%{?rhel} <= 8 || 0%{?fedora}
pushd build-with-gimp
%configure --enable-gimp
%make_build
popd
%endif
pushd build-without-gimp
%configure --disable-gimp
@ -166,9 +173,11 @@ pushd build-without-gimp
%make_install
popd
%if 0%{?rhel} <= 8 || 0%{?fedora}
# install GIMP plugin
install -m 0755 -d %{buildroot}%{gimpplugindir}
install -m 0755 build-with-gimp/src/xsane %{buildroot}%{gimpplugindir}
%endif
# install customized desktop file
rm %{buildroot}%{_datadir}/applications/xsane.desktop
@ -221,11 +230,13 @@ EOF
%find_lang %{name} XSANE.lang
%if 0%{?rhel} <= 8 || 0%{?fedora}
%pre gimp
# remove obsolete gimp-plugin-mgr managed symlink
if [ -L "%{gimpplugindir}/xsane" ]; then
rm -f "%{gimpplugindir}/xsane"
fi
%endif
%files -f XSANE.lang
%doc xsane.ACCELKEYS xsane.AUTHOR xsane.BEGINNERS-INFO xsane.BUGS xsane.CHANGES xsane.FAQ xsane.LANGUAGES xsane.LOGO xsane.NEWS xsane.ONLINEHELP xsane.PROBLEMS xsane.ROOT xsane.TODO
@ -242,8 +253,10 @@ fi
%{_datadir}/pixmaps/xsane.xpm
%{iconrootdir}/*/apps/%{name}.png
%if 0%{?rhel} <= 8 || 0%{?fedora}
%files gimp
%{gimpplugindir}/xsane
%endif
%files common
%doc xsane.AUTHOR
@ -252,6 +265,9 @@ fi
%{_datadir}/sane/xsane
%changelog
* Thu Jan 14 2021 Zdenek Dohnal <zdohnal@redhat.com> - 0.999-39
- remove gimp plugin for eln, put explicit requirement for GTK2
* Thu Nov 05 2020 Zdenek Dohnal <zdohnal@redhat.com> - 0.999-38
- make is no longer in buildroot by default