diff --git a/meson.build b/meson.build index e8969cc..4974d28 100644 --- a/meson.build +++ b/meson.build @@ -1,14 +1,8 @@ # Project definition -project('zlevis', license: 'GPL3') +project('zlevis', license: 'GPL3', version: '2.3') -# Define bindir -bindir = join_paths(get_option('prefix'), get_option('bindir')) - -# Define bins list -bins = [] +# Define bin dir +bin_dir = join_paths(get_option('prefix'), get_option('bindir')) # Define subdir with bins subdir('src') - -# Install bins in bindir -install_data(bins, install_dir: bindir) diff --git a/src/meson.build b/src/meson.build index 09c3d2c..a7fbadc 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,14 +1,14 @@ -# Find scripts -main = find_program('zlevis') -encrypt = find_program('zlevis-encrypt') -decrypt = find_program('zlevis-decrypt') +# Find the scripts +frontend = find_program('zlevis.in') +encrypt = find_program('zlevis-encrypt.in') +decrypt = find_program('zlevis-decrypt.in') # Test the scripts -test('zlevis', main, args: '--summary') +test('zlevis', frontend, args: '--summary') test('zlevis-encrypt', encrypt, args: '--summary') test('zlevis-decrypt', decrypt, args: '--summary') -# Add paths of scripts to bins -bins += join_paths(meson.current_source_dir(), 'zlevis') -bins += join_paths(meson.current_source_dir(), 'zlevis-encrypt') -bins += join_paths(meson.current_source_dir(), 'zlevis-decrypt') \ No newline at end of file +# Configure the scripts +configure_file(input: 'zlevis.in', output: 'zlevis', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir) +configure_file(input: 'zlevis-encrypt.in', output: 'zlevis-encrypt', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir) +configure_file(input: 'zlevis-decrypt.in', output: 'zlevis-decrypt', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir)