!10 Disable gimp plugin build
From: @ultra_planet Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
504318b5e3
20
xsane.spec
20
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 <lingsheng@huawei.com> - 0.999-32
|
||||
- Disable gimp plugin build
|
||||
|
||||
* Fri Sep 11 2020 baizhonggui <baizhonggui@huawei.com> - 0.999-31
|
||||
- Modify source0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user