2019-07-01 10:43:26 +00:00
|
|
|
project(
|
|
|
|
'uberwriter',
|
|
|
|
version: '2.2.0',
|
|
|
|
meson_version: '>= 0.50.0'
|
|
|
|
)
|
|
|
|
|
|
|
|
if get_option('profile') == 'development'
|
2019-12-25 20:34:00 +00:00
|
|
|
profile = '.Devel'
|
2019-07-01 10:43:26 +00:00
|
|
|
name_suffix = ' (Development)'
|
|
|
|
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
|
|
|
|
if vcs_tag == ''
|
|
|
|
version_suffix = '-devel'
|
|
|
|
else
|
|
|
|
version_suffix = '-@0@'.format (vcs_tag)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
profile = ''
|
|
|
|
name_suffix = ''
|
|
|
|
version_suffix = ''
|
|
|
|
endif
|
|
|
|
application_id = 'de.wolfvollprecht.UberWriter@0@'.format(profile)
|
|
|
|
|
|
|
|
|
|
|
|
python = import('python3')
|
|
|
|
python3 = python.find_python()
|
|
|
|
if not python3.found()
|
|
|
|
error('No valid python3 binary found')
|
|
|
|
else
|
|
|
|
message('Found python3 binary')
|
|
|
|
endif
|
|
|
|
gnome = import('gnome')
|
|
|
|
i18n = import('i18n')
|
|
|
|
|
|
|
|
|
|
|
|
dependency('glib-2.0')
|
|
|
|
dependency('gobject-2.0')
|
|
|
|
dependency('gobject-introspection-1.0')
|
|
|
|
dependency('gtk+-3.0')
|
|
|
|
|
|
|
|
find_program('glib-compile-schemas', required: true)
|
|
|
|
find_program('gtk-update-icon-cache', required: false)
|
|
|
|
find_program('update-desktop-database', required: false)
|
|
|
|
|
|
|
|
gettext_package = meson.project_name()
|
|
|
|
localedir = get_option('prefix') / get_option('localedir')
|
2019-10-29 11:11:21 +00:00
|
|
|
pythondir = join_paths(get_option('prefix'), python.sysconfig_path('purelib'))
|
2019-07-01 10:43:26 +00:00
|
|
|
datadir = get_option('prefix') / get_option('datadir')
|
2019-10-28 20:40:51 +00:00
|
|
|
bindir = join_paths(get_option('prefix'), get_option('bindir'))
|
2019-07-01 10:43:26 +00:00
|
|
|
pkgdatadir = datadir / meson.project_name()
|
|
|
|
podir = meson.source_root() / 'po'
|
|
|
|
|
2019-10-28 20:40:51 +00:00
|
|
|
conf = configuration_data()
|
2019-11-04 22:05:21 +00:00
|
|
|
conf.set('PACKAGE_URL', 'http://uberwriter.github.io/uberwriter/')
|
2019-10-28 20:40:51 +00:00
|
|
|
conf.set('DATA_DIR', datadir)
|
|
|
|
conf.set('LOCALE_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'locale'))
|
|
|
|
conf.set('PYTHON_DIR', pythondir)
|
|
|
|
conf.set('VERSION', meson.project_version())
|
|
|
|
conf.set('PYTHON', python3.path())
|
|
|
|
|
|
|
|
|
2019-07-01 10:43:26 +00:00
|
|
|
subdir('data')
|
2019-10-28 20:40:51 +00:00
|
|
|
#subdir('help')
|
2019-07-01 10:43:26 +00:00
|
|
|
subdir('po')
|
|
|
|
|
2019-10-29 11:09:06 +00:00
|
|
|
install_subdir(
|
|
|
|
'uberwriter',
|
2019-10-29 11:11:21 +00:00
|
|
|
install_dir: pythondir
|
2019-10-29 11:09:06 +00:00
|
|
|
)
|
|
|
|
|
2019-10-28 20:40:51 +00:00
|
|
|
message('Preparing init file')
|
|
|
|
configure_file(
|
|
|
|
input: 'uberwriter.in',
|
|
|
|
output: 'uberwriter',
|
|
|
|
configuration: conf,
|
|
|
|
install_dir: bindir
|
|
|
|
)
|
|
|
|
|
2019-07-01 10:43:26 +00:00
|
|
|
meson.add_install_script('build-aux/meson_post_install.py')
|
|
|
|
|