1 2# man page name, section, [aliases] 3manpages = [ 4 ['default.pa', '5'], 5 ['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']], 6 ['pacmd', '1'], 7 ['pactl', '1'], 8 ['padsp', '1'], 9 ['pasuspender', '1'], 10 ['pax11publish', '1'], 11 ['pulse-cli-syntax', '5'], 12 ['pulse-client.conf', '5'], 13 ['pulse-daemon.conf', '5'], 14 ['pulseaudio', '1'], 15 ['start-pulseaudio-x11', '1'], 16] 17 18# FIXME: Add esdcompat if HAVE_ESOUND 19#manpages += ['esdcompat', '1'], 20 21man_data = configuration_data() 22man_data.set('PACKAGE_URL', 'http://pulseaudio.org/') 23man_data.set('PACKAGE_BUGREPORT', 'pulseaudio-discuss (at) lists (dot) freedesktop (dot) org') 24man_data.set('PA_DEFAULT_CONFIG_DIR', cdata.get_unquoted('PA_DEFAULT_CONFIG_DIR')) 25 26perl = find_program('perl', required: true) 27xmltoman_cmd = [perl, join_paths(meson.current_source_dir(), 'xmltoman')] 28xmllint = find_program('xmllint', required: false) 29 30foreach tuple : manpages 31 stem = tuple[0] 32 section = tuple[1] 33 aliases = tuple.get(2, []) 34 35 man = stem + '.' + section 36 xmlin = man + '.xml.in' 37 xml = man + '.xml' 38 39 xml_file = configure_file( 40 input : xmlin, 41 output : xml, 42 configuration : man_data, 43 ) 44 45 mandirn = join_paths(mandir, 'man' + section) 46 47 custom_target( 48 man + '-target', 49 input : xml_file, 50 output : man, 51 capture : true, 52 command : xmltoman_cmd + ['@INPUT@'], 53 install : true, 54 install_dir : mandirn, 55 ) 56 57 foreach alias_stem : aliases 58 alias = alias_stem + '.' + section 59 dst = join_paths(mandirn, alias) 60 cmd = 'ln -fs @0@ $DESTDIR@1@'.format(man, dst) 61 meson.add_install_script('sh', '-c', cmd) 62 endforeach 63 64 if xmllint.found() 65 test( 66 'Validate xml file ' + xml, 67 xmllint, 68 args : [ 69 '--noout', '--valid', 70 '--path', meson.current_source_dir(), 71 join_paths(meson.current_build_dir(), xml)] 72 ) 73 endif 74endforeach 75