summary refs log tree commit diff stats
path: root/data/misc/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'data/misc/meson.build')
-rw-r--r--data/misc/meson.build59
1 files changed, 58 insertions, 1 deletions
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