mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-01-05 09:17:45 +03:00
97ed170b5e
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
168 lines
5.0 KiB
RPMSpec
168 lines
5.0 KiB
RPMSpec
%{?mingw_package_header}
|
|
|
|
%define relver 1%{?dist}
|
|
|
|
# We want the 1st part of the release number, and
|
|
# the 3rd part (or 0 if not present).
|
|
# 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})
|
|
|
|
%define msiver @VERSION@-%{rel0}.%{rel1}
|
|
|
|
Name: mingw-virt-viewer
|
|
Version: @VERSION@
|
|
Release: %{relver}
|
|
Summary: MinGW Windows virt-viewer console application
|
|
|
|
License: GPL-2.0-or-later
|
|
URL: https://gitlab.com/virt-viewer/virt-viewer
|
|
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
|
|
BuildRequires: mingw64-filesystem
|
|
BuildRequires: mingw32-glib2
|
|
BuildRequires: mingw64-glib2
|
|
BuildRequires: mingw32-glib-networking
|
|
BuildRequires: mingw64-glib-networking
|
|
BuildRequires: mingw32-gstreamer1-plugins-bad-free
|
|
BuildRequires: mingw64-gstreamer1-plugins-bad-free
|
|
BuildRequires: mingw32-gstreamer1-plugins-good
|
|
BuildRequires: mingw64-gstreamer1-plugins-good
|
|
BuildRequires: mingw32-gtk3
|
|
BuildRequires: mingw64-gtk3
|
|
BuildRequires: mingw32-hicolor-icon-theme
|
|
BuildRequires: mingw64-hicolor-icon-theme
|
|
BuildRequires: mingw32-libgovirt
|
|
BuildRequires: mingw64-libgovirt
|
|
BuildRequires: mingw32-libusbx
|
|
BuildRequires: mingw64-libusbx
|
|
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
|
|
BuildRequires: mingw32-readline
|
|
BuildRequires: mingw64-readline
|
|
BuildRequires: mingw32-rest
|
|
BuildRequires: mingw64-rest
|
|
BuildRequires: mingw32-spice-glib
|
|
BuildRequires: mingw64-spice-glib
|
|
BuildRequires: mingw32-spice-gtk3
|
|
BuildRequires: mingw64-spice-gtk3
|
|
BuildRequires: mingw32-usbredir
|
|
BuildRequires: mingw64-usbredir
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: /usr/bin/pod2man
|
|
BuildRequires: gettext
|
|
BuildRequires: icoutils
|
|
BuildRequires: dos2unix
|
|
BuildRequires: hwdata
|
|
BuildRequires: msitools
|
|
BuildRequires: glib2-devel
|
|
|
|
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
|
|
|
|
%package -n mingw64-virt-viewer-msi
|
|
Summary: MinGW Windows virt-viewer MSI
|
|
Group: Applications/Internet
|
|
|
|
%package -n mingw32-virt-viewer-msi
|
|
Summary: MinGW Windows virt-viewer MSI
|
|
Group: Applications/Internet
|
|
|
|
%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
|
|
|
|
%description -n mingw64-virt-viewer-msi
|
|
MinGW Windows virt-viewer MSI
|
|
|
|
%description -n mingw32-virt-viewer-msi
|
|
MinGW Windows virt-viewer MSI
|
|
|
|
%{mingw_debug_package}
|
|
|
|
%prep
|
|
%setup -q -n virt-viewer-%{version}
|
|
|
|
%build
|
|
%mingw_meson -Dbuild-id=%{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/virt-viewer-x86-%{msiver}.msi
|
|
%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/virt-viewer-x64-%{msiver}.msi
|
|
%endif
|
|
|
|
%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*
|
|
|
|
%files -n mingw32-virt-viewer-msi
|
|
%{mingw32_datadir}/virt-viewer/virt-viewer-x86-%{msiver}.msi
|
|
|
|
%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*
|
|
|
|
%files -n mingw64-virt-viewer-msi
|
|
%{mingw64_datadir}/virt-viewer/virt-viewer-x64-%{msiver}.msi
|
|
|
|
%changelog
|