2012-12-13 21:14:30 +04:00
%{?mingw_package_header}
2012-09-14 20:34:53 +04:00
2014-06-09 14:48:52 +04:00
%define relver 1%{?dist}
# We want the 1st part of the release number, and
2018-05-07 17:40:31 +03:00
# the 3rd part (or 0 if not present).
2014-06-09 14:48:52 +04:00
# This scheme lets us cope with RHEL-style z-stream
# versioning when creating Win product versions
%define rel0 %(echo %{relver} | cut -d. -f1)
%define rel1 %(test -z "`echo %{relver} | cut -d. -f3`" && echo 0 || (echo %{relver} | cut -d. -f3))
%define buildid %(expr %{rel0} \\* 256 + %{rel1})
2021-02-22 21:07:52 +03:00
%define msiver @VERSION@-%{rel0}.%{rel1}
2012-09-14 20:34:53 +04:00
Name : mingw-virt-viewer
Version : @VERSION@
2018-05-07 17:40:31 +03:00
Release : %{relver}
2012-09-14 20:34:53 +04:00
Summary : MinGW Windows virt-viewer console application
2023-04-26 19:47:19 +03:00
License : GPL-2.0-or-later
2021-01-11 18:36:50 +03:00
URL : https://gitlab.com/virt-viewer/virt-viewer
2021-01-11 18:58:25 +03:00
Source0 : https://virt-manager.org/download/sources/virt-viewer/virt-viewer-%{version} .tar.xz
2012-09-14 20:34:53 +04:00
2021-01-11 18:58:25 +03:00
BuildRequires : meson
2016-04-26 15:36:57 +03:00
BuildRequires : mingw32-adwaita-icon-theme
BuildRequires : mingw64-adwaita-icon-theme
2021-01-11 18:35:22 +03:00
BuildRequires : mingw32-filesystem
BuildRequires : mingw64-filesystem
BuildRequires : mingw32-glib2
BuildRequires : mingw64-glib2
2015-01-09 14:13:30 +03:00
BuildRequires : mingw32-glib-networking
BuildRequires : mingw64-glib-networking
2015-06-24 15:34:48 +03:00
BuildRequires : mingw32-gstreamer1-plugins-bad-free
BuildRequires : mingw64-gstreamer1-plugins-bad-free
2015-01-09 13:51:45 +03:00
BuildRequires : mingw32-gstreamer1-plugins-good
BuildRequires : mingw64-gstreamer1-plugins-good
2021-01-11 18:35:22 +03:00
BuildRequires : mingw32-gtk3
BuildRequires : mingw64-gtk3
2019-03-01 18:33:20 +03:00
BuildRequires : mingw32-hicolor-icon-theme
BuildRequires : mingw64-hicolor-icon-theme
2014-12-23 02:57:44 +03:00
BuildRequires : mingw32-libgovirt
BuildRequires : mingw64-libgovirt
2012-12-13 21:14:54 +04:00
BuildRequires : mingw32-libusbx
BuildRequires : mingw64-libusbx
2021-01-11 18:35:22 +03:00
BuildRequires : mingw32-libvirt
BuildRequires : mingw64-libvirt
BuildRequires : mingw32-libvirt-glib
BuildRequires : mingw64-libvirt-glib
BuildRequires : mingw32-libxml2
BuildRequires : mingw64-libxml2
BuildRequires : mingw32-gtk-vnc2
BuildRequires : mingw64-gtk-vnc2
2012-12-13 21:14:54 +04:00
BuildRequires : mingw32-readline
BuildRequires : mingw64-readline
2014-12-23 02:57:44 +03:00
BuildRequires : mingw32-rest
BuildRequires : mingw64-rest
2012-12-13 21:14:54 +04:00
BuildRequires : mingw32-spice-glib
BuildRequires : mingw64-spice-glib
2021-01-11 18:35:22 +03:00
BuildRequires : mingw32-spice-gtk3
BuildRequires : mingw64-spice-gtk3
2012-12-13 21:14:54 +04:00
BuildRequires : mingw32-usbredir
BuildRequires : mingw64-usbredir
2012-09-14 20:34:53 +04:00
BuildRequires : pkgconfig
2013-04-03 16:02:30 +04:00
BuildRequires : /usr/bin/pod2man
2019-02-20 18:19:43 +03:00
BuildRequires : gettext
2012-12-13 21:14:54 +04:00
BuildRequires : icoutils
BuildRequires : dos2unix
2014-12-23 02:55:58 +03:00
BuildRequires : hwdata
2021-01-11 18:35:22 +03:00
BuildRequires : msitools
2019-03-01 18:27:28 +03:00
BuildRequires : glib2-devel
2012-09-14 20:34:53 +04:00
BuildArch : noarch
%package -n mingw32-virt-viewer
Summary : MinGW Windows virt-viewer console application
Group : Applications/Internet
%package -n mingw64-virt-viewer
Summary : MinGW Windows virt-viewer console application
Group : Applications/Internet
2013-04-03 16:02:30 +04:00
%package -n mingw64-virt-viewer-msi
Summary : MinGW Windows virt-viewer MSI
2012-12-13 21:14:54 +04:00
Group : Applications/Internet
2013-04-03 16:02:30 +04:00
%package -n mingw32-virt-viewer-msi
Summary : MinGW Windows virt-viewer MSI
2012-12-13 21:14:54 +04:00
Group : Applications/Internet
2012-09-14 20:34:53 +04:00
%description
MinGW Windows virt-viewer console application
%description -n mingw32-virt-viewer
MinGW Windows virt-viewer console application
%description -n mingw64-virt-viewer
MinGW Windows virt-viewer console application
2013-04-03 16:02:30 +04:00
%description -n mingw64-virt-viewer-msi
MinGW Windows virt-viewer MSI
2012-12-13 21:14:54 +04:00
2013-04-03 16:02:30 +04:00
%description -n mingw32-virt-viewer-msi
MinGW Windows virt-viewer MSI
2012-12-13 21:14:54 +04:00
2012-12-21 18:24:42 +04:00
%{mingw_debug_package}
2012-09-14 20:34:53 +04:00
%prep
%setup -q -n virt-viewer-%{version}
%build
2021-02-12 21:14:17 +03:00
%mingw_meson -Dbuild-id=%{buildid}
2021-01-11 18:58:25 +03:00
%mingw_ninja
2013-04-03 16:02:30 +04:00
2021-01-11 18:58:25 +03:00
%if 0%{?mingw_build_win32} == 1
%endif
%if 0%{?mingw_build_win64} == 1
%endif
2012-09-14 20:34:53 +04:00
%install
2021-01-11 18:58:25 +03:00
%mingw_ninja_install
2012-09-14 20:34:53 +04:00
2012-12-13 21:14:54 +04:00
%if 0%{?mingw_build_win32} == 1
2021-01-11 18:58:25 +03:00
DESTDIR=%{buildroot} ninja -C build_win32$MINGW_BUILDDIR_SUFFIX data/virt-viewer-x86-@VERSION@.msi
2016-02-26 20:08:40 +03:00
mkdir $RPM_BUILD_ROOT /%{mingw32_datadir} /virt-viewer
2021-02-22 21:07:52 +03:00
cp build_win32$MINGW_BUILDDIR_SUFFIX/data/virt-viewer-x86-@VERSION@.msi $RPM_BUILD_ROOT /%{mingw32_datadir} /virt-viewer/virt-viewer-x86-%{msiver} .msi
2012-12-13 21:14:54 +04:00
%endif
%if 0%{?mingw_build_win64} == 1
2021-01-11 18:58:25 +03:00
DESTDIR=%{buildroot} ninja -C build_win64$MINGW_BUILDDIR_SUFFIX data/virt-viewer-x64-@VERSION@.msi
2016-02-26 20:08:40 +03:00
mkdir $RPM_BUILD_ROOT /%{mingw64_datadir} /virt-viewer
2021-02-22 21:07:52 +03:00
cp build_win64$MINGW_BUILDDIR_SUFFIX/data/virt-viewer-x64-@VERSION@.msi $RPM_BUILD_ROOT /%{mingw64_datadir} /virt-viewer/virt-viewer-x64-%{msiver} .msi
2012-12-13 21:14:54 +04:00
%endif
2012-09-14 20:34:53 +04:00
%find_lang virt-viewer
%files -n mingw32-virt-viewer -f virt-viewer.lang
%defattr (-,root,root)
%{mingw32_bindir} /virt-viewer.exe
%{mingw32_bindir} /remote-viewer.exe
%{mingw32_bindir} /windows-cmdline-wrapper.exe
%dir %{mingw32_datadir} /virt-viewer/
%{mingw32_datadir} /icons/hicolor/*/apps/*
%{mingw32_mandir} /man1/virt-viewer.1*
%{mingw32_mandir} /man1/remote-viewer.1*
2013-04-03 16:02:30 +04:00
%files -n mingw32-virt-viewer-msi
2021-02-22 21:07:52 +03:00
%{mingw32_datadir} /virt-viewer/virt-viewer-x86-%{msiver} .msi
2012-12-13 21:14:54 +04:00
2012-09-14 20:34:53 +04:00
%files -n mingw64-virt-viewer -f virt-viewer.lang
%defattr (-,root,root)
%{mingw64_bindir} /virt-viewer.exe
%{mingw64_bindir} /remote-viewer.exe
%{mingw64_bindir} /windows-cmdline-wrapper.exe
%dir %{mingw64_datadir} /virt-viewer/
%{mingw64_datadir} /icons/hicolor/*/apps/*
%{mingw64_mandir} /man1/virt-viewer.1*
%{mingw64_mandir} /man1/remote-viewer.1*
2013-04-03 16:02:30 +04:00
%files -n mingw64-virt-viewer-msi
2021-02-22 21:07:52 +03:00
%{mingw64_datadir} /virt-viewer/virt-viewer-x64-%{msiver} .msi
2012-12-13 21:14:54 +04:00
2012-09-14 20:34:53 +04:00
%changelog