# # Copyright (C) 2020 Arnaud Ferraris # # SPDX-License-Identifier: GPL-3.0-or-later # conf_files = [ 'pine64,pinephone-1.0.toml', 'pine64,pinephone-1.1.toml', 'pine64,pinephone-1.2.toml', 'pine64,pinephone-pro.toml', ] install_data(conf_files) serviceconf = configuration_data() serviceconf.set('bindir', bindir) configure_file( input: 'eg25-manager.service.in', output: 'eg25-manager.service', install_dir: systemdsystemdir, configuration: serviceconf, install: true ) scdoc = dependency('scdoc', native: true, required: false) if scdoc.found() scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) foreach section: [5, 8] name = 'eg25-manager' out = '@0@.@1@'.format(name, section) preprocessed = configure_file( input: '@0@.scd'.format(out), output: '@BASENAME@.preprocessed', configuration: { 'eg25_confdir': eg25_confdir, 'eg25_datadir': eg25_datadir, } ) custom_target( out, output: out, input: preprocessed, command: ['sh', '-c', '@0@ < @INPUT@'.format(scdoc_prog.path())], capture: true, install: true, install_dir: join_paths(get_option('mandir'), 'man@0@'.format(section))) endforeach endif