From 8a875afad0ae426917fbe3c468a54c5becb509db Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Sat, 17 Mar 2018 01:21:50 -0400 Subject: build: Add metainfo files for addons --- data/misc/io.github.Hexchat.Plugin.metainfo.xml.in | 11 ++++ data/misc/meson.build | 59 +++++++++++++++++++++- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 data/misc/io.github.Hexchat.Plugin.metainfo.xml.in (limited to 'data') diff --git a/data/misc/io.github.Hexchat.Plugin.metainfo.xml.in b/data/misc/io.github.Hexchat.Plugin.metainfo.xml.in new file mode 100644 index 00000000..d6fec5de --- /dev/null +++ b/data/misc/io.github.Hexchat.Plugin.metainfo.xml.in @@ -0,0 +1,11 @@ + + + io.github.Hexchat.Plugin.Perl + io.github.Hexchat.desktop + @NAME@ Plugin + @SUMMARY@ + https://hexchat.github.io/ + GPL-2.0+ + CC0-1.0 + tingping_AT_fedoraproject.org + \ No newline at end of file diff --git a/data/misc/meson.build b/data/misc/meson.build index bce952a7..26b037ce 100644 --- a/data/misc/meson.build +++ b/data/misc/meson.build @@ -1,4 +1,5 @@ appdir = join_paths(get_option('datadir'), 'applications') +metainfodir = join_paths(get_option('datadir'), 'metainfo') desktop_utils = find_program('desktop-file-validate', required: false) if get_option('with-gtk') @@ -7,7 +8,7 @@ if get_option('with-gtk') output: 'io.github.Hexchat.appdata.xml', po_dir: '../../po', install: true, - install_dir: join_paths(get_option('datadir'), 'metainfo') + install_dir: metainfodir ) appstream_util = find_program('appstream-util', required: false) @@ -66,3 +67,59 @@ if get_option('with-theme-manager') install_dir: join_paths(get_option('datadir'), 'mime/packages') ) endif + +if get_option('with-plugin') + plugin_metainfo = [] + + # FIXME: These should all get translated somewhere + if get_option('with-checksum') + plugin_metainfo += [ + ['Checksum', 'Calculates a checksum for all sent and recieved DCC files'] + ] + endif + + if get_option('with-fishlim') + plugin_metainfo += [ + ['Fishlim', 'Allows setting a key for encrypted conversations'] + ] + endif + + if get_option('with-lua') != 'false' + plugin_metainfo += [ + ['Lua', 'Provides a scripting interface in Lua'] + ] + endif + + if get_option('with-perl') + plugin_metainfo += [ + ['Perl', 'Provides a scripting interface in Perl'] + ] + endif + + if get_option('with-python') != 'false' + plugin_metainfo += [ + ['Python', 'Provides a scripting interface in Python'] + ] + endif + + if get_option('with-sysinfo') + plugin_metainfo += [ + ['Sysinfo', 'Adds command to display system information'] + ] + endif + + foreach metainfo : plugin_metainfo + name = metainfo[0] + desc = metainfo[1] + conf = configuration_data() + conf.set('NAME', name) + conf.set('SUMMARY', desc) + + configure_file( + input: 'io.github.Hexchat.Plugin.metainfo.xml.in', + output: 'io.github.Hexchat.Plugin.@0@.metainfo.xml'.format(name), + configuration: conf, + install_dir: get_option('install-plugin-metainfo') ? metainfodir : '', + ) + endforeach +endif \ No newline at end of file -- cgit 1.4.1