summary refs log tree commit diff stats
path: root/data/misc
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2018-03-17 01:21:50 -0400
committerPatrick Griffis <tingping@tingping.se>2018-03-17 01:21:50 -0400
commit8a875afad0ae426917fbe3c468a54c5becb509db (patch)
treeebc41c7a610e0edec73429a677b3edd97216312d /data/misc
parentdc483b234253c3a72e006e0e15d81c73b8b2a511 (diff)
build: Add metainfo files for addons
Diffstat (limited to 'data/misc')
-rw-r--r--data/misc/io.github.Hexchat.Plugin.metainfo.xml.in11
-rw-r--r--data/misc/meson.build59
2 files changed, 69 insertions, 1 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="addon">
+  <id>io.github.Hexchat.Plugin.Perl</id>
+  <extends>io.github.Hexchat.desktop</extends>
+  <name>@NAME@ Plugin</name>
+  <summary>@SUMMARY@</summary>
+  <url type="homepage">https://hexchat.github.io/</url>
+  <project_license>GPL-2.0+</project_license>
+  <metadata_license>CC0-1.0</metadata_license>
+  <update_contact>tingping_AT_fedoraproject.org</update_contact>
+</component>
\ 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