aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhrxi <hrrrxi@gmail.com>2023-06-04 09:40:29 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2023-10-06 15:25:12 +0200
commit7326ca4d1b61f775666dc53adc23aae51f5b643d (patch)
tree2516bc3dff9ce4a6ded3a60137410660601d7c76
parent6d838c1c317164fb7e54442312f63d4cb4beaddd (diff)
downloaddino-7326ca4d1b61f775666dc53adc23aae51f5b643d.tar.gz
dino-7326ca4d1b61f775666dc53adc23aae51f5b643d.zip
meson: Add openpgp plugin
-rw-r--r--meson.build1
-rw-r--r--plugins/meson.build1
-rw-r--r--plugins/openpgp/data/gresource.xml6
-rw-r--r--plugins/openpgp/meson.build43
-rw-r--r--plugins/openpgp/po/meson.build1
5 files changed, 52 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 02da2b35..ef14dbec 100644
--- a/meson.build
+++ b/meson.build
@@ -10,6 +10,7 @@ dep_gee = dependency('gee-0.8')
dep_gio = dependency('gio-2.0')
dep_glib = dependency('glib-2.0')
dep_gmodule = dependency('gmodule-2.0')
+dep_gpgme = dependency('gpgme')
dep_gtk4 = dependency('gtk4')
dep_icu_uc = dependency('icu-uc')
dep_libadwaita = dependency('libadwaita-1')
diff --git a/plugins/meson.build b/plugins/meson.build
index 88fbb335..bacf9678 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -1 +1,2 @@
subdir('http-files')
+subdir('openpgp')
diff --git a/plugins/openpgp/data/gresource.xml b/plugins/openpgp/data/gresource.xml
new file mode 100644
index 00000000..fbe2e8e9
--- /dev/null
+++ b/plugins/openpgp/data/gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/im/dino/Dino/openpgp">
+ <file>account_settings_item.ui</file>
+ </gresource>
+</gresources>
diff --git a/plugins/openpgp/meson.build b/plugins/openpgp/meson.build
new file mode 100644
index 00000000..806494f2
--- /dev/null
+++ b/plugins/openpgp/meson.build
@@ -0,0 +1,43 @@
+subdir('po')
+dependencies = [
+ dep_dino,
+ dep_gee,
+ dep_glib,
+ dep_gmodule,
+ dep_gpgme,
+ dep_gtk4,
+ dep_qlite,
+ dep_xmpp_vala,
+]
+sources = files(
+ 'src/account_settings_entry.vala',
+ 'src/contact_details_provider.vala',
+ 'src/database.vala',
+ 'src/encryption_list_entry.vala',
+ 'src/file_transfer/file_decryptor.vala',
+ 'src/file_transfer/file_encryptor.vala',
+ 'src/gpgme_fix.c',
+ 'src/gpgme_helper.vala',
+ 'src/manager.vala',
+ 'src/plugin.vala',
+ 'src/register_plugin.vala',
+ 'src/stream_flag.vala',
+ 'src/stream_module.vala',
+ 'src/util.vala',
+ 'vapi/gpg-error.vapi',
+)
+sources += gnome.compile_resources(
+ 'resources',
+ 'data/gresource.xml',
+ source_dir: 'data',
+)
+c_args = [
+ '-DG_LOG_DOMAIN="OpenPGP"',
+ '-DGETTEXT_PACKAGE="dino-openpgp"',
+ '-DLOCALE_INSTALL_DIR="@0@"'.format(get_option('prefix') / get_option('localedir')),
+]
+vala_args = [
+ '--vapidir', meson.current_source_dir() / 'vapi',
+]
+lib_openpgp = shared_library('openpgp', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, install: true, install_dir: get_option('libdir') / 'dino/plugins')
+dep_openpgp = declare_dependency(link_with: lib_openpgp, include_directories: include_directories('.'))
diff --git a/plugins/openpgp/po/meson.build b/plugins/openpgp/po/meson.build
new file mode 100644
index 00000000..ac755b55
--- /dev/null
+++ b/plugins/openpgp/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext('dino-openpgp')