mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-03 01:18:00 +03:00
meson: rename and modify spec file
We will create the final spec file by meson to have virt-manager version in single place. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
d803491c47
commit
1f80a62239
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,5 +15,4 @@
|
|||||||
/man/virt-clone.1
|
/man/virt-clone.1
|
||||||
/man/virt-xml.1
|
/man/virt-xml.1
|
||||||
|
|
||||||
/virt-manager.spec
|
|
||||||
/virtinst/build.cfg
|
/virtinst/build.cfg
|
||||||
|
19
meson.build
19
meson.build
@ -5,3 +5,22 @@ project('virt-manager',
|
|||||||
|
|
||||||
python = import('python')
|
python = import('python')
|
||||||
python3 = python.find_installation('python3')
|
python3 = python.find_installation('python3')
|
||||||
|
|
||||||
|
# figure out if we are building from git
|
||||||
|
git = run_command('test', '-e', '.git', check: false).returncode() == 0
|
||||||
|
|
||||||
|
subdir('scripts')
|
||||||
|
|
||||||
|
if git
|
||||||
|
spec_conf = configuration_data({
|
||||||
|
'VERSION': meson.project_version(),
|
||||||
|
})
|
||||||
|
|
||||||
|
spec_file = configure_file(
|
||||||
|
input: 'virt-manager.spec.in',
|
||||||
|
output: '@BASENAME@',
|
||||||
|
configuration: spec_conf,
|
||||||
|
)
|
||||||
|
|
||||||
|
meson.add_dist_script(meson_dist_prog.full_path(), spec_file)
|
||||||
|
endif
|
||||||
|
8
scripts/meson.build
Normal file
8
scripts/meson.build
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
scripts = [
|
||||||
|
'meson_dist.py',
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach name : scripts
|
||||||
|
sname = name.split('.')[0].underscorify()
|
||||||
|
set_variable('@0@_prog'.format(sname), find_program(name))
|
||||||
|
endforeach
|
13
scripts/meson_dist.py
Normal file
13
scripts/meson_dist.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import sys
|
||||||
|
|
||||||
|
file_name = sys.argv[1]
|
||||||
|
|
||||||
|
meson_build_root = os.environ['MESON_BUILD_ROOT']
|
||||||
|
meson_dist_root = os.environ['MESON_DIST_ROOT']
|
||||||
|
|
||||||
|
shutil.copy(os.path.join(meson_build_root, file_name),
|
||||||
|
os.path.join(meson_dist_root, file_name))
|
@ -7,7 +7,7 @@
|
|||||||
# End local config
|
# End local config
|
||||||
|
|
||||||
Name: virt-manager
|
Name: virt-manager
|
||||||
Version: 4.1.0
|
Version: @VERSION@
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
%global verrel %{version}-%{release}
|
%global verrel %{version}-%{release}
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ Summary: Desktop tool for managing virtual machines via libvirt
|
|||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
URL: https://virt-manager.org/
|
URL: https://virt-manager.org/
|
||||||
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: virt-manager-common = %{verrel}
|
Requires: virt-manager-common = %{verrel}
|
||||||
@ -53,7 +53,7 @@ Suggests: python3-libguestfs
|
|||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-docutils
|
BuildRequires: python3-docutils
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: meson
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -104,18 +104,15 @@ machine).
|
|||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{default_hvs}
|
%meson \
|
||||||
%global _default_hvs --default-hvs %{default_hvs}
|
-Ddefault-hvs=%{default_hvs} \
|
||||||
%endif
|
-Dupdate-icon-cache=false \
|
||||||
|
-Dcompile-schemas=false
|
||||||
./setup.py configure \
|
%meson_build
|
||||||
%{?_default_hvs}
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
./setup.py \
|
%meson_install
|
||||||
--no-update-icon-cache --no-compile-schemas \
|
|
||||||
install -O1 --root=%{buildroot}
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
%if 0%{?py_byte_compile:1}
|
%if 0%{?py_byte_compile:1}
|
Loading…
Reference in New Issue
Block a user