diff --git a/mingw-virt-viewer.spec.in b/mingw-virt-viewer.spec.in index 853c642..b0811d8 100644 --- a/mingw-virt-viewer.spec.in +++ b/mingw-virt-viewer.spec.in @@ -17,8 +17,9 @@ Summary: MinGW Windows virt-viewer console application License: GPLv2+ URL: https://gitlab.com/virt-viewer/virt-viewer -Source0: https://virt-manager.org/download/sources/virt-viewer/virt-viewer-%{version}.tar.gz +Source0: https://virt-manager.org/download/sources/virt-viewer/virt-viewer-%{version}.tar.xz +BuildRequires: meson BuildRequires: mingw32-adwaita-icon-theme BuildRequires: mingw64-adwaita-icon-theme BuildRequires: mingw32-filesystem @@ -105,33 +106,32 @@ MinGW Windows virt-viewer MSI %setup -q -n virt-viewer-%{version} %build -%mingw_configure --with-gtk=3.0 --with-buildid=%{buildid} - -%mingw_make %{?_smp_mflags} V=1 -%mingw_make %{?_smp_mflags} V=1 -C data msi - -%install -%mingw_make_install DESTDIR=$RPM_BUILD_ROOT +%mingw_meson -Dbuildid=%{buildid} +%mingw_ninja %if 0%{?mingw_build_win32} == 1 +%endif + +%if 0%{?mingw_build_win64} == 1 +%endif + +%install +%mingw_ninja_install + +%if 0%{?mingw_build_win32} == 1 +DESTDIR=%{buildroot} ninja -C build_win32$MINGW_BUILDDIR_SUFFIX data/virt-viewer-x86-@VERSION@.msi mkdir $RPM_BUILD_ROOT/%{mingw32_datadir}/virt-viewer cp build_win32$MINGW_BUILDDIR_SUFFIX/data/virt-viewer-x86-@VERSION@.msi $RPM_BUILD_ROOT/%{mingw32_datadir}/virt-viewer %endif %if 0%{?mingw_build_win64} == 1 +DESTDIR=%{buildroot} ninja -C build_win64$MINGW_BUILDDIR_SUFFIX data/virt-viewer-x64-@VERSION@.msi mkdir $RPM_BUILD_ROOT/%{mingw64_datadir}/virt-viewer cp build_win64$MINGW_BUILDDIR_SUFFIX/data/virt-viewer-x64-@VERSION@.msi $RPM_BUILD_ROOT/%{mingw64_datadir}/virt-viewer %endif %find_lang virt-viewer -# Don't need the XDG desktop files on Windows -find $RPM_BUILD_ROOT -name "*.desktop" -delete - -%clean -rm -rf $RPM_BUILD_ROOT - - %files -n mingw32-virt-viewer -f virt-viewer.lang %defattr(-,root,root) %{mingw32_bindir}/virt-viewer.exe diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in index e01a81b..5c930cc 100644 --- a/virt-viewer.spec.in +++ b/virt-viewer.spec.in @@ -1,31 +1,19 @@ # -*- rpm-spec -*- -# Default to skipping autoreconf. Distros can change just this one line -# (or provide a command-line override) if they backport any patches that -# touch configure.ac or Makefile.am. -%{!?enable_autotools:%global enable_autotools 0} - Name: virt-viewer Version: @VERSION@ Release: 1%{?dist} Summary: Virtual Machine Viewer License: GPLv2+ URL: https://gitlab.com/virt-viewer/virt-viewer -Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz +Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.xz Requires: openssh-clients # Our bash completion script uses virsh to list domains Requires: libvirt-client - -%if 0%{?enable_autotools} -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: gettext-devel -BuildRequires: libtool -%endif - BuildRequires: gcc +BuildRequires: meson BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(libvirt) @@ -50,20 +38,13 @@ the display, and libvirt for looking up VNC/SPICE server details. %setup -q %build - -%if 0%{?enable_autotools} -autoreconf -if -%endif - -%configure --with-buildid=%{release} --disable-update-mimedb -%__make %{?_smp_mflags} - +%meson -Dbuildid=%{release} +%meson_build %install -rm -rf $RPM_BUILD_ROOT -%__make install DESTDIR=$RPM_BUILD_ROOT -%find_lang %{name} +%meson_install +%find_lang %{name} %files -f %{name}.lang %doc README.md COPYING AUTHORS ChangeLog NEWS