X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=meson.build;h=134e95d4756f3759e318936174fc201c5f8996e1;hb=da012db02d85ea990efcc3dbea9cf5473de85fe8;hp=0c012b69fe1f81ac15fa1058be8378eba809f308;hpb=3994922bafc3555ac8eb52d6d14d0d580eee7d8a;p=thirdparty%2Fsystemd.git diff --git a/meson.build b/meson.build index 0c012b69fe1..134e95d4756 100644 --- a/meson.build +++ b/meson.build @@ -676,13 +676,17 @@ conf.set_quoted('DEFAULT_NET_NAMING_SCHEME', default_net_naming_scheme) time_epoch = get_option('time-epoch') if time_epoch == -1 - source_date_epoch = run_command('sh', ['-c', 'echo "$SOURCE_DATE_EPOCH"']).stdout().strip() - if source_date_epoch != '' - time_epoch = source_date_epoch.to_int() - else + time_epoch = run_command('sh', ['-c', 'echo "$SOURCE_DATE_EPOCH"']).stdout().strip() + if time_epoch == '' and git.found() and run_command('test', '-e', '.git').returncode() == 0 + # If we're in a git repository, use the creation time of the latest git tag. + latest_tag = run_command('git', 'describe', '--abbrev=0', '--tags').stdout().strip() + time_epoch = run_command('git', 'log', '-1', '--format=%at', latest_tag).stdout() + endif + if time_epoch == '' NEWS = files('NEWS') - time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout().to_int() + time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout() endif + time_epoch = time_epoch.to_int() endif conf.set('TIME_EPOCH', time_epoch) @@ -1795,11 +1799,11 @@ public_programs += executable( include_directories : includes, link_with : [libshared], dependencies : [threads, - libqrencode, + libdl, libxz, liblz4, - libpcre2, - libzstd], + libzstd, + libdl], install_rpath : rootlibexecdir, install : true, install_dir : rootbindir) @@ -2664,6 +2668,7 @@ if conf.get('ENABLE_REPART') == 1 install_rpath : rootlibexecdir, install : true, install_dir : rootbindir) + public_programs += exe if want_tests != 'false' test('test-repart', @@ -3080,7 +3085,7 @@ executable( link_with : [libshared], dependencies : [libaudit], install_rpath : rootlibexecdir, - install : true, + install : (conf.get('ENABLE_UTMP') == 1), install_dir : rootlibexecdir) if conf.get('HAVE_KMOD') == 1