2024-10-25 15:48:27 +03:00
project ( 'virt-manager' ,
version : '4.1.0' ,
meson_version : '>=0.63.0' ,
)
python = import ( 'python' )
python3 = python . find_installation ( 'python3' )
2024-10-25 15:48:27 +03:00
2024-10-25 15:48:27 +03:00
prefix = get_option ( 'prefix' )
datadir = prefix / get_option ( 'datadir' )
2024-10-25 15:48:27 +03:00
bindir = prefix / get_option ( 'bindir' )
2024-10-25 15:48:27 +03:00
pkgdir = datadir / 'virt-manager'
2024-10-25 15:48:27 +03:00
2024-10-25 15:48:27 +03:00
# figure out if we are building from git
git = run_command ( 'test' , '-e' , '.git' , check : false ) . returncode ( ) == 0
subdir ( 'scripts' )
2024-10-25 15:48:27 +03:00
subdir ( 'man' )
2024-10-25 15:48:27 +03:00
subdir ( 'data' )
2024-10-25 15:48:27 +03:00
subdir ( 'ui' )
2024-10-25 15:48:27 +03:00
subdir ( 'virtinst' )
2024-10-25 15:48:27 +03:00
subdir ( 'virtManager' )
2024-10-25 15:48:27 +03:00
subdir ( 'po' )
2024-10-25 15:48:27 +03:00
2024-10-25 15:48:27 +03:00
bin_data = [
{ 'pkgname' : 'virtinst' , 'filename' : 'virtinstall' , 'toolname' : 'virt-install' } ,
{ 'pkgname' : 'virtinst' , 'filename' : 'virtclone' , 'toolname' : 'virt-clone' } ,
{ 'pkgname' : 'virtinst' , 'filename' : 'virtxml' , 'toolname' : 'virt-xml' } ,
{ 'pkgname' : 'virtManager' , 'filename' : 'virtmanager' , 'toolname' : 'virt-manager' } ,
]
foreach bin : bin_data
custom_target (
command : [ make_bin_wrapper_prog , pkgdir , bin [ 'pkgname' ] , bin [ 'filename' ] ] ,
capture : true ,
output : bin [ 'toolname' ] ,
install : true ,
install_dir : bindir ,
install_mode : 'rwxr-xr-x' ,
)
endforeach
2024-10-25 15:48:27 +03:00
gnome = import ( 'gnome' )
gnome . post_install (
glib_compile_schemas : get_option ( 'compile-schemas' ) ,
gtk_update_icon_cache : get_option ( 'update-icon-cache' ) ,
)
2024-10-25 15:48:27 +03:00
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