mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-01-20 14:03:40 +03:00
rpm: convert the RPM builds over to using meson
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
b2c072cf0b
commit
1f701aae66
@ -17,8 +17,9 @@ Summary: MinGW Windows virt-viewer console application
|
|||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://gitlab.com/virt-viewer/virt-viewer
|
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: mingw32-adwaita-icon-theme
|
||||||
BuildRequires: mingw64-adwaita-icon-theme
|
BuildRequires: mingw64-adwaita-icon-theme
|
||||||
BuildRequires: mingw32-filesystem
|
BuildRequires: mingw32-filesystem
|
||||||
@ -105,33 +106,32 @@ MinGW Windows virt-viewer MSI
|
|||||||
%setup -q -n virt-viewer-%{version}
|
%setup -q -n virt-viewer-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%mingw_configure --with-gtk=3.0 --with-buildid=%{buildid}
|
%mingw_meson -Dbuildid=%{buildid}
|
||||||
|
%mingw_ninja
|
||||||
%mingw_make %{?_smp_mflags} V=1
|
|
||||||
%mingw_make %{?_smp_mflags} V=1 -C data msi
|
|
||||||
|
|
||||||
%install
|
|
||||||
%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%if 0%{?mingw_build_win32} == 1
|
%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
|
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
|
cp build_win32$MINGW_BUILDDIR_SUFFIX/data/virt-viewer-x86-@VERSION@.msi $RPM_BUILD_ROOT/%{mingw32_datadir}/virt-viewer
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?mingw_build_win64} == 1
|
%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
|
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
|
cp build_win64$MINGW_BUILDDIR_SUFFIX/data/virt-viewer-x64-@VERSION@.msi $RPM_BUILD_ROOT/%{mingw64_datadir}/virt-viewer
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%find_lang virt-viewer
|
%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
|
%files -n mingw32-virt-viewer -f virt-viewer.lang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{mingw32_bindir}/virt-viewer.exe
|
%{mingw32_bindir}/virt-viewer.exe
|
||||||
|
@ -1,31 +1,19 @@
|
|||||||
# -*- rpm-spec -*-
|
# -*- 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
|
Name: virt-viewer
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Virtual Machine Viewer
|
Summary: Virtual Machine Viewer
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://gitlab.com/virt-viewer/virt-viewer
|
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
|
Requires: openssh-clients
|
||||||
|
|
||||||
# Our bash completion script uses virsh to list domains
|
# Our bash completion script uses virsh to list domains
|
||||||
Requires: libvirt-client
|
Requires: libvirt-client
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?enable_autotools}
|
|
||||||
BuildRequires: autoconf
|
|
||||||
BuildRequires: automake
|
|
||||||
BuildRequires: gettext-devel
|
|
||||||
BuildRequires: libtool
|
|
||||||
%endif
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
BuildRequires: meson
|
||||||
BuildRequires: pkgconfig(glib-2.0)
|
BuildRequires: pkgconfig(glib-2.0)
|
||||||
BuildRequires: pkgconfig(gtk+-3.0)
|
BuildRequires: pkgconfig(gtk+-3.0)
|
||||||
BuildRequires: pkgconfig(libvirt)
|
BuildRequires: pkgconfig(libvirt)
|
||||||
@ -50,20 +38,13 @@ the display, and libvirt for looking up VNC/SPICE server details.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%meson -Dbuildid=%{release}
|
||||||
%if 0%{?enable_autotools}
|
%meson_build
|
||||||
autoreconf -if
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%configure --with-buildid=%{release} --disable-update-mimedb
|
|
||||||
%__make %{?_smp_mflags}
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
%meson_install
|
||||||
%__make install DESTDIR=$RPM_BUILD_ROOT
|
|
||||||
%find_lang %{name}
|
|
||||||
|
|
||||||
|
%find_lang %{name}
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%doc README.md COPYING AUTHORS ChangeLog NEWS
|
%doc README.md COPYING AUTHORS ChangeLog NEWS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user