> > On Mon, Jul 17, 2017 at 05:21:29AM -0400, Frediano Ziglio wrote: > > > > > > Test various image and formats. > > > The idea is to decode and encode again an image and > > > check for differences. ImageMagick is used to create > > > some test image and compare results. > > > Wine is used to execute a test helper. > > > > > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > > > > A bit OT. I was trying to execute a "make check" during RPM build. > > I need some additional support, specifically wine and ImageMagick. > > ImageMagick is not a big issue, just add a BuildRequires however > > wine requires: > > - wine-core(x86-32) and wine-core(x86-64) > > - the build system to be x64 > > > > Now in some system (like RHEL 7) you cannot install wine-core(x86-32) and > > wine-core(x86-64) > > together so the BuildRequires will fail (works on fedora 25/26 for > > instance). > > > > How to check all these in the spec file so to run in either way? > > Some select bits from libvirt.spec: > %if (0%{?fedora} && 0%{?fedora} >= 23) || (0%{?rhel} && 0%{?rhel} >= 6) > %define supported_platform 1 > %else > %define supported_platform 0 > %endif > > %ifnarch %{ix86} x86_64 ia64 > %define with_xen 0 > %define with_libxl 0 > %endif > This seems to work! diff --git a/mingw-spice-vdagent.spec.in b/mingw-spice-vdagent.spec.in index f874e66..6e62b10 100644 --- a/mingw-spice-vdagent.spec.in +++ b/mingw-spice-vdagent.spec.in @@ -2,6 +2,12 @@ #define _version_suffix -e198 +%if "%{_build_arch}" == "x86_64" && (0%{?fedora} && 0%{?fedora} >= 24) + %define can_do_check 1 +%else + %define can_do_check 0 +%endif + Name: mingw-spice-vdagent Version: @VERSION@ Release: 1%{?dist}%{?extra_release} @@ -22,6 +28,9 @@ BuildRequires: mingw64-zlib-static BuildRequires: mingw32-winpthreads-static BuildRequires: mingw64-winpthreads-static BuildRequires: pkgconfig +%if %{can_do_check} +BuildRequires: ImageMagick wine-core(x86-32) wine-core(x86-64) +%endif BuildArch: noarch @@ -73,6 +82,10 @@ Features: %mingw_configure --enable-debug %mingw_make %{?_smp_mflags} V=1 +%if %{can_do_check} +%check +%mingw_make check +%endif %install %mingw_make_install DESTDIR=$RPM_BUILD_ROOT > Any idea if the rhel7 issue you mention is likely to be fixed? > No idea how to check. I supposed will be fixed as packages came from fedora. I'm actually using epel-7-x86_64 mock so maybe is a problem of this mock configuration. > Christophe > > Frediano _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel