diff --git a/meson.build b/meson.build index 35171d6..c409ca3 100644 --- a/meson.build +++ b/meson.build @@ -156,3 +156,29 @@ if get_option('build-peerindex') install_man(peerindex_man) endif +if get_option('bgpscanner-legacy') + supported_systems = [ + 'cygwin', 'darwin', 'dragonfly', + 'freebsd', 'gnu', 'linux', + 'netbsd', 'openbsd', 'sunos', + ] + + if supported_systems.contains(host_machine.system()) + cdata = configuration_data({ + 'UTILITY': 'bgpscanner', + 'VERSION': '"' + meson.project_version() + '"', + }) + bgpscanner_man = configure_file(input : 'tools/bgpscanner/bgpscanner.1.in', + output : 'bgpscanner.1', + configuration : cdata, + install : false) + + install_data('tools/bgpscanner/bgpscanner', + install_dir : get_option('bindir'), + install_mode : 'rwxr-xr-x') + + install_man(bgpscanner_man) + else + message('Skipping bgpscanner legacy wrapper installation on ' + host_machine.system()) + endif +endif diff --git a/meson_options.txt b/meson_options.txt index a2c550b..6fa6192 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,6 +1,7 @@ option('native', type : 'boolean', value : false, description : 'Optimize build for local CPU architecture (ties build artifacts to your local machine!)') option('build-doc', type : 'boolean', description : 'Build documentation using doxygen') # TODO option('build-benchmarks', type : 'boolean', value : false, description : 'Build benchmarks') -# TODO option('build-tests', type : 'boolean', value : false, description : 'Build unit tests') +option('build-tests', type : 'boolean', value : false, description : 'Build tests') option('build-bgpgrep', type : 'boolean', description : 'Build bgpgrep MRT/BGP parsing and filting utility') option('build-peerindex', type : 'boolean', description : 'Build peerindex MRT TABLE_DUMPV2 Peer Index Table inspection tool') +option('bgpscanner-legacy', type : 'boolean', value : false, description : 'Install a legacy wrapper script for backwards compatibility with Isolario bgpscanner') \ No newline at end of file