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