Commit c6f1217d authored by Jan Tojnar's avatar Jan Tojnar Committed by Tanu Kaskinen
Browse files

Port to meson

parent 534d20a1
......@@ -95,10 +95,10 @@ module <tt>module-gsettings</tt> must be loaded in the daemon.</p>
<h2><a name="installation">Installation</a></h2>
<p>As this package is made with the GNU autotools you should run
<tt>./configure</tt> inside the distribution directory for configuring
the source tree. After that you should run <tt>make</tt> for
compilation and <tt>make install</tt> (as root) for installation of
<p>As this package is made with the Meson you should run
<tt>meson build</tt> inside the distribution directory for configuring
the source tree. After that you should run <tt>ninja -C build</tt> for
compilation and <tt>ninja -C build install</tt> (as root) for installation of
<tt>paprefs</tt>.</p>
<h2><a name="acks">Acknowledgements</a></h2>
......
#!/bin/sh
lynx --dump $1 | sed 's,file://localhost/.*/doc/README.html,README,'
doc_conf = configuration_data()
doc_conf.set('PACKAGE_VERSION', meson.project_version())
doc_conf.set('PACKAGE_BUGREPORT', mailing_list)
doc_conf.set('PACKAGE_URL', homepage)
readme_html = configure_file(
input: 'README.html.in',
output: 'README.html',
configuration: doc_conf,
)
if tidy.found()
test('XHTML documentation uses correct mark-up', tidy, args: ['-e', readme_html])
endif
if with_lynx
custom_target(
'README',
input: readme_html,
output: 'README',
command: [find_program('./html2txt'), '@INPUT@'],
capture: true,
build_by_default: true,
)
endif
project('paprefs', 'cpp',
license: 'GPL2+',
version: '0.9.10',
meson_version: '>=0.40.1'
)
mailing_list = 'pulseaudio-discuss (at) lists (dot) freedesktop (dot) org'
homepage = 'http://freedesktop.org/software/pulseaudio/paprefs/'
with_lynx = get_option('lynx')
i18n = import('i18n')
gtkmm = dependency('gtkmm-3.0')
giomm = dependency('giomm-2.4', version: '>= 2.26')
sigc = dependency('sigc++-2.0')
dbus_glib = dependency('dbus-glib-1')
libpulse = dependency('libpulse')
lynx = find_program('lynx', required: with_lynx)
tidy = find_program('tidy', required: false)
prefix = get_option('prefix')
bindir = join_paths(prefix, get_option('bindir'))
localedir = join_paths(prefix, get_option('localedir'))
datadir = join_paths(prefix, get_option('datadir'))
pkgdatadir = join_paths(datadir, meson.project_name())
conf = configuration_data()
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('GLADE_FILE', join_paths(pkgdatadir, 'paprefs.glade'))
conf.set_quoted('LOCALEDIR', localedir)
conf.set_quoted('MODDIR', libpulse.get_pkgconfig_variable('modlibexecdir'))
# Needs fixing on some borked OS
conf.set_quoted('SHREXT', '.so')
configure_file(
output : 'config.h',
configuration : conf
)
common_flags = [
'-DHAVE_CONFIG_H',
]
add_project_arguments(common_flags, language: 'cpp')
configuration_inc = include_directories('.')
subdir('src')
subdir('po')
subdir('doc')
option('lynx', type: 'boolean', value: false, description: 'enable documentation generation (using lynx)')
i18n.gettext(
meson.project_name(),
preset: 'glib',
)
paprefs_sources = [
'paprefs.cc',
]
paprefs_dependencies = [
giomm,
gtkmm,
sigc,
dbus_glib,
libpulse,
]
executable(
'paprefs',
paprefs_sources,
include_directories: configuration_inc,
dependencies: paprefs_dependencies,
install: true,
)
desktop_file = i18n.merge_file(
input: 'paprefs.desktop.in',
output: 'paprefs.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
install_dir: join_paths(datadir, 'applications'),
)
install_data(
'paprefs.glade',
install_dir: join_paths(pkgdatadir),
)
[Desktop Entry]
Version=1.0
Encoding=UTF-8
_Name=PulseAudio Preferences
_GenericName=Sound Server Preferences
_Comment=View and modify the configuration of the local sound server
Name=PulseAudio Preferences
GenericName=Sound Server Preferences
Comment=View and modify the configuration of the local sound server
Exec=paprefs
Icon=preferences-desktop
StartupNotify=true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment