diff options
author | Jonathan Kang <jonathan121537@gmail.com> | 2017-11-17 17:51:09 +0800 |
---|---|---|
committer | Jonathan Kang <jonathan121537@gmail.com> | 2017-12-13 15:25:44 +0800 |
commit | 4707e790dd91df48c737465bde4fae2e7091c782 (patch) | |
tree | 3a7d596c4f992b960126f86501619a60a5344f0d /data/meson.build | |
parent | 6c70467dc6d1d5fcafba9a4fda8c0da2e12283b3 (diff) | |
download | gnome-logs-4707e790dd91df48c737465bde4fae2e7091c782.tar.gz |
Port to meson build system
According to this wiki[0], port Logs to meson build system.
*[0] https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
https://bugzilla.gnome.org/show_bug.cgi?id=790276
Diffstat (limited to 'data/meson.build')
-rw-r--r-- | data/meson.build | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..daabc55 --- /dev/null +++ b/data/meson.build @@ -0,0 +1,103 @@ +subdir('icons') + +add_global_arguments('-DGL_BINDIR="@0@"'.format(gl_bindir), language : 'c') + +gettext_package = gl_name + +i18n.merge_file( + input : 'org.gnome.Logs.desktop.in', + output : 'org.gnome.Logs.desktop', + type : 'desktop', + po_dir : 'po', + install : true, + install_dir : join_paths(gl_datadir, 'applications') +) + +i18n.merge_file( + input : 'org.gnome.Logs.appdata.xml.in', + output : 'org.gnome.Logs.appdata.xml', + po_dir : 'po', + install : true, + install_dir : join_paths(gl_datadir, 'appdata') +) + +service_conf = configuration_data() +service_conf.set('bindir', gl_bindir) + +service = 'org.gnome.Logs.service' + +configure_file( + input: service + '.in', + output: service, + install: true, + install_dir: join_paths(gl_datadir, 'dbus-1', 'services'), + configuration: service_conf +) + +resource_data = files( + 'gl-categorylist.ui', + 'gl-eventviewlist.ui', + 'gl-eventtoolbar.ui', + 'gl-eventviewdetail.ui', + 'gl-searchpopover.ui', + 'gl-window.ui', + 'help-overlay.ui', + 'menus.ui' +) + +gresource = files('org.gnome.Logs.gresource.xml') + +web_files = files( + 'gl-style.css' +) + +install_data( + web_files, + install_dir: gl_pkgdatadir +) + +# GSettings schemas +# https://github.com/mesonbuild/meson/issues/1687 +custom_target('gsettings-enums', + input: '../src/gl-application.h', + output: 'org.gnome.Logs.enums.xml', + install: true, + install_dir: join_paths(gl_datadir, 'glib-2.0', 'schemas'), + capture: true, + command: ['glib-mkenums', + '--comments', '<!-- @comment@ -->', + '--fhead', '<schemalist>', + '--vhead', ' <@type@ id="org.gnome.Logs.@EnumName@">', + '--vprod', ' <value nick="@valuenick@" value="@valuenum@"/>', + '--vtail', ' </@type@>', + '--ftail', '</schemalist>', + '@INPUT@' + ] +) +install_data( + 'org.gnome.Logs.gschema.xml', + install_dir : join_paths(gl_datadir, 'glib-2.0', 'schemas') +) + +configure_file( + input : 'version.xml.in', + output : 'version.xml', + command : ['cp', '@INPUT@', '@OUTPUT@'] +) + +if logs_enable_man + custom_target('gl-manfile', + input : 'gnome-logs.xml', + output : 'gnoem-logs.1', + install : true, + install_dir : gl_mandir, + command : [ + xsltproc, + '--nonet', + '--path', join_paths(meson.source_root(), 'data') + ':' + 'data', + '--output', 'data/', + 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl', + '@INPUT@' + ] + ) +endif |