From a2e542021d5d09b7664d79b7df8f76eaccda9b78 Mon Sep 17 00:00:00 2001 From: lingsheng Date: Tue, 2 Mar 2021 20:35:56 +0800 Subject: [PATCH] Disable gimp plugin build --- xsane.spec | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/xsane.spec b/xsane.spec index af6baf7..763e88b 100644 --- a/xsane.spec +++ b/xsane.spec @@ -2,9 +2,11 @@ %global iconsdir %{_datadir}/icons/hicolor %global _configure ../configure +%bcond_with gimp + Name: xsane Version: 0.999 -Release: 31 +Release: 32 Summary: X Window System front-end for the SANE scanner interface License: GPLv2+ URL: http://www.xsane.org/ @@ -27,7 +29,7 @@ Patch0013: xsane-0.999-coverity.patch Patch0014: xsane-0.999-snprintf-update.patch Patch0015: xsane-0.999-signal-handling.patch Patch0016: xsane-0.999-7-autoconf.patch -BuildRequires: gcc gimp-devel lcms2-devel libjpeg-devel sane-backends-devel >= 1.0.19-15 +BuildRequires: gcc gtk2-devel lcms2-devel libjpeg-devel sane-backends-devel >= 1.0.19-15 BuildRequires: libtiff-devel gettext-devel desktop-file-utils >= 0.2.92 Requires: xsane-common hicolor-icon-theme hicolor-icon-theme @@ -37,8 +39,10 @@ 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 %{with gimp} %package gimp Summary: GIMP plug-in providing the SANE scanner interface +BuildRequires: gimp-devel Requires: gimp >= 2:2.2.12-4 Requires: xsane-common @@ -46,6 +50,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 @@ -74,10 +79,12 @@ mkdir build-without-gimp %build CFLAGS='%optflags -fno-strict-aliasing -DXSANE_BUGTRACKER_URL=\"https://gitee.com/organizations/src-openeuler/issues\"' export CFLAGS +%if %{with gimp} pushd build-with-gimp %configure --enable-gimp make %{?_smp_mflags} popd +%endif pushd build-without-gimp %configure --disable-gimp make @@ -88,8 +95,10 @@ cp %{SOURCE1} src/ pushd build-without-gimp make DESTDIR=%{buildroot} install popd +%if %{with gimp} install -m 0755 -d %{buildroot}%{gimpplugindir} install -m 0755 build-with-gimp/src/xsane %{buildroot}%{gimpplugindir} +%endif rm %{buildroot}%{_datadir}/applications/xsane.desktop desktop-file-install \ --dir %{buildroot}%{_datadir}/applications \ @@ -132,10 +141,12 @@ EOF %find_lang %{name} XSANE.lang +%if %{with gimp} %pre gimp 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 @@ -146,8 +157,10 @@ fi %{_datadir}/pixmaps/xsane.xpm %{iconsdir}/*/apps/%{name}.png +%if %{with gimp} %files gimp %{gimpplugindir}/xsane +%endif %files common %doc xsane.AUTHOR @@ -159,6 +172,9 @@ fi %{_mandir}/man1/* %changelog +* Tue Mar 2 2021 lingsheng - 0.999-32 +- Disable gimp plugin build + * Fri Sep 11 2020 baizhonggui - 0.999-31 - Modify source0