[seahorse/wip/nielsdg/meson] Port build system to Meson
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse/wip/nielsdg/meson] Port build system to Meson
- Date: Mon, 30 Oct 2017 19:47:04 +0000 (UTC)
commit ecbd09567adf26aa4a8ec594ea9e114e0cfe012f
Author: Niels De Graef <nielsdegraef gmail com>
Date: Mon Sep 18 11:47:04 2017 +0200
Port build system to Meson
common/meson.build | 35 ++++++++
data/icons/meson.build | 26 ++++++
data/meson.build | 56 +++++++++++++
gkr/meson.build | 26 ++++++
help/meson.build | 53 ++++++++++++
libegg/meson.build | 42 ++++++++++
libseahorse/meson.build | 57 +++++++++++++
meson.build | 192 ++++++++++++++++++++++++++++++++++++++++++++
meson/gpg_check_version.py | 42 ++++++++++
meson/post_install.py | 15 ++++
meson_options.txt | 7 ++
pgp/meson.build | 51 ++++++++++++
pkcs11/meson.build | 27 ++++++
po/meson.build | 3 +
seahorse.gresource.xml | 27 ++++++
src/meson.build | 42 ++++++++++
src/seahorse-main.c | 2 +-
ssh/meson.build | 49 +++++++++++
18 files changed, 751 insertions(+), 1 deletions(-)
---
diff --git a/common/meson.build b/common/meson.build
new file mode 100644
index 0000000..1cc41cc
--- /dev/null
+++ b/common/meson.build
@@ -0,0 +1,35 @@
+common_sources = [
+ 'actions.vala',
+ 'backend.vala',
+ 'catalog.vala',
+ 'deletable.vala',
+ 'delete-dialog.vala',
+ 'deleter.vala',
+ 'exportable.vala',
+ 'exporter.vala',
+ 'icons.vala',
+ 'lockable.vala',
+ 'place.vala',
+ 'registry.vala',
+ 'types.vala',
+ 'util.vala',
+ 'viewable.vala',
+]
+
+common_deps = [
+ glib_deps,
+ gtk,
+ gcr,
+ config,
+]
+
+common_lib = static_library('common',
+ common_sources,
+ dependencies: common_deps,
+ vala_header: 'seahorse-common.h',
+)
+
+common_dep = declare_dependency(
+ link_with: common_lib,
+ include_directories: include_directories('.'),
+)
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000..f369e13
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,26 @@
+icons_install_dir = join_paths(datadir, 'icons', 'hicolor')
+
+# TODO
+icon_sizes = [
+ 16,
+ 22,
+ 24,
+ 32,
+ 48,
+]
+
+foreach size: icon_sizes
+ foreach app: [ 'seahorse', 'seahorse-preferences' ]
+ size_str = '@0@x@0@'.format(size)
+ install_data(
+ 'hicolor_apps_@0@_@1@.png'.format(size_str, app),
+ install_dir: join_paths(icons_install_dir, 'apps'),
+ )
+ endforeach
+endforeach
+
+# special case for symbolic and 256
+install_data(
+ 'hicolor_apps_256x256_seahorse.png',
+ install_dir: icons_install_dir,
+)
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..7969d02
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,56 @@
+subdir('icons')
+
+# GSettings
+gsettings_files = [
+ 'org.gnome.seahorse.gschema.xml',
+ 'org.gnome.seahorse.manager.gschema.xml',
+ 'org.gnome.seahorse.window.gschema.xml',
+]
+install_data(gsettings_files,
+ install_dir: join_paths(datadir, 'glib-2.0', 'schemas'),
+)
+
+# The appdata file
+i18n.merge_file(
+ input: 'seahorse.appdata.xml.in',
+ output: 'seahorse.appdata.xml',
+ type: 'xml',
+ po_dir: po_dir,
+ install: true,
+ install_dir: join_paths(datadir, 'metainfo')
+)
+
+# The configuration for the desktop and service files
+desktop_conf = configuration_data()
+desktop_conf.set('bindir', bindir)
+desktop_conf.set('VERSION', meson.project_version())
+
+# The desktop file
+configured_desktop_file = configure_file(
+ input: 'seahorse.desktop.in.in',
+ output: 'seahorse.desktop.in',
+ configuration: desktop_conf,
+)
+i18n.merge_file(
+ input: configured_desktop_file,
+ output: 'seahorse.desktop',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: join_paths(datadir, 'applications')
+)
+
+# The service file
+configure_file(
+ input: 'org.gnome.seahorse.Application.service.in',
+ output: 'org.gnome.seahorse.Application.service',
+ configuration: desktop_conf,
+ install: true,
+ install_dir: join_paths(datadir, 'dbus-1', 'services'),
+)
+
+# The search provider
+install_data(
+ 'seahorse-search-provider.ini',
+ install_dir: join_paths(datadir, 'gnome-shell', 'search-providers')
+)
diff --git a/gkr/meson.build b/gkr/meson.build
new file mode 100644
index 0000000..05c3f25
--- /dev/null
+++ b/gkr/meson.build
@@ -0,0 +1,26 @@
+gkr_src = [
+ 'gkr-backend.vala',
+ 'gkr-dialogs.vala',
+ 'gkr-module.vala',
+ 'gkr-item.vala',
+ 'gkr-item-add.vala',
+ 'gkr-item-properties.vala',
+ 'gkr-keyring.vala',
+ 'gkr-keyring-add.vala',
+ 'gkr-keyring-properties.vala',
+]
+
+gkr_dependencies = [
+ glib_deps,
+ gtk,
+ gcr,
+ gcr_ui,
+ libsecret,
+ config,
+ common_dep,
+]
+
+gkr_lib = static_library('seahorse-gkr',
+ gkr_src,
+ dependencies: gkr_dependencies,
+)
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 0000000..899ef10
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,53 @@
+help_pages = [
+ 'about-diff-private-public.page',
+ 'about-pgp.page',
+ 'about-ssh.page',
+ 'concepts.page',
+ 'glossary.page',
+ 'index.page',
+ 'introduction.page',
+ 'key-servers-add.page',
+ 'keyring-change-default.page',
+ 'keyring-create.page',
+ 'keyring-lock.page',
+ 'keyring-unlock.page',
+ 'keyring-update-password.page',
+ 'keyring.page',
+ 'legal.xml',
+ 'misc-key-backup.page',
+ 'misc-key-fingerprint.page',
+ 'passwords-stored-create.page',
+ 'passwords-view.page',
+ 'pgp-create.page',
+ 'pgp-delete.page',
+ 'pgp-expiration-change.page',
+ 'pgp-expired.page',
+ 'pgp-export.page',
+ 'pgp-import.page',
+ 'pgp-photoid.page',
+ 'pgp-publish.page',
+ 'pgp-retrieve-remote.page',
+ 'pgp-sign.page',
+ 'pgp-subkeys.page',
+ 'pgp-sync.page',
+ 'pgp-userid-add.page',
+ 'pgp-userid-primary.page',
+ 'pgp-userid-remove.page',
+ 'pgp-userid.page',
+ 'ssh-connect-remote.page',
+ 'ssh-create.page',
+ 'ssh-export.page',
+ 'ssh-import.page',
+ 'subkeys-add.page',
+ 'subkeys-examine.page',
+ 'subkeys-revoke.page',
+]
+
+help_media = [
+ 'media/seahorse.png',
+]
+
+gnome.yelp(meson.project_name(),
+ sources: help_pages,
+ media: help_media,
+)
diff --git a/libegg/meson.build b/libegg/meson.build
new file mode 100644
index 0000000..d962814
--- /dev/null
+++ b/libegg/meson.build
@@ -0,0 +1,42 @@
+libeggdatetime_src = [
+ 'egg-datetime.c',
+]
+
+libeggdatetime_dependencies = [
+ gtk,
+ config,
+]
+
+libeggdatetime_cflags = [
+ '-DGTK_DISABLE_DEPRECATED',
+ '-DGDK_DISABLE_DEPRECATED',
+ '-DG_DISABLE_DEPRECATED',
+]
+
+libeggdatetime_lib = static_library('libeggdatetime',
+ libeggdatetime_src,
+ c_args: libeggdatetime_cflags,
+ dependencies: libeggdatetime_dependencies,
+)
+
+
+libtreemultidnd_src = [
+ 'eggtreemultidnd.c',
+]
+
+libtreemultidnd_dependencies = [
+ gtk,
+ config,
+]
+
+libtreemultidnd_cflags = [
+ '-DGTK_DISABLE_DEPRECATED',
+ '-DGDK_DISABLE_DEPRECATED',
+ '-DG_DISABLE_DEPRECATED',
+]
+
+libtreemultidnd_lib = static_library('libtreemultidnd',
+ libtreemultidnd_src,
+ c_args: libtreemultidnd_cflags,
+ dependencies: libtreemultidnd_dependencies,
+)
diff --git a/libseahorse/meson.build b/libseahorse/meson.build
new file mode 100644
index 0000000..ea7ef58
--- /dev/null
+++ b/libseahorse/meson.build
@@ -0,0 +1,57 @@
+marshaller = gnome.genmarshal('seahorse-marshal',
+ sources: 'seahorse-marshal.list',
+ prefix: 'seahorse_marshal',
+)
+
+search_provider_src = gnome.gdbus_codegen('seahorse-shell-search-provider-generated',
+ 'org.gnome.ShellSearchProvider2.xml',
+ interface_prefix : 'org.gnome.',
+ namespace : 'Seahorse',
+)
+
+
+libseahorse_sources = [
+ 'seahorse-application.c',
+ 'seahorse-bind.c',
+ 'seahorse-collection.c',
+ 'seahorse-interaction.c',
+ 'seahorse-key-manager-store.c',
+ 'seahorse-object.c',
+ 'seahorse-object-list.c',
+ 'seahorse-object-model.c',
+ 'seahorse-object-widget.c',
+ 'seahorse-passphrase.c',
+ 'seahorse-predicate.c',
+ 'seahorse-prefs.c',
+ 'seahorse-progress.c',
+ 'seahorse-search-provider.c',
+ 'seahorse-servers.c',
+ 'seahorse-util.c',
+ 'seahorse-validity.c',
+ 'seahorse-widget.c',
+ marshaller,
+ resources_src,
+ search_provider_src,
+]
+
+if with_keyserver
+ libseahorse_sources += 'seahorse-keyserver-control.c'
+endif
+
+libseahorse_deps = [
+ glib_deps,
+ gcr,
+ libsecret,
+ common_dep,
+]
+
+libseahorse_lib = static_library('libseahorse',
+ libseahorse_sources,
+ dependencies: libseahorse_deps,
+ include_directories: [ include_directories('.'), include_directories('..') ],
+)
+
+libseahorse_dep = declare_dependency(
+ link_with: libseahorse_lib,
+ include_directories: [ include_directories('.'), include_directories('..') ],
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..4077a68
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,192 @@
+project('seahorse', ['vala', 'c'],
+ version: '3.20.0',
+ meson_version: '>= 0.39',
+ license: 'GPL2+',
+)
+
+gnome = import('gnome')
+i18n = import('i18n')
+
+# Options
+with_pgp = get_option('pgp-support')
+check_compatible_gpg = get_option('check-compatible-gpg')
+with_pkcs11 = get_option('pkcs11-support')
+with_keyserver = get_option('keyservers-support')
+strict_mode = get_option('strict-mode')
+
+# Some variables
+cc = meson.get_compiler('c')
+valac = meson.get_compiler('vala')
+buildtype = get_option('buildtype')
+
+seahorse_prefix = get_option('prefix')
+po_dir = join_paths(meson.source_root(), 'po')
+datadir = join_paths(seahorse_prefix, get_option('datadir'))
+bindir = join_paths(seahorse_prefix, get_option('bindir'))
+pkgdatadir = join_paths(datadir, meson.project_name())
+libexecbindir = join_paths(get_option('libexecdir'), meson.project_name())
+localedir = join_paths(seahorse_prefix, get_option('localedir'))
+
+# Project-wide flags
+add_project_arguments([
+ '-DGCR_API_SUBJECT_TO_CHANGE',
+ '-DGCK_API_SUBJECT_TO_CHANGE',
+ '-include', 'config.h',
+ ],
+ language: 'c',
+)
+
+# Use more warnings
+warning_flags = [
+ '-Wall',
+ '-Wchar-subscripts',
+ '-Wmissing-declarations',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wpointer-arith',
+ '-Wcast-align',
+ '-Wsign-compare',
+ '-Wno-deprecated-declarations',
+ '-Wno-strict-aliasing',
+ '-Wno-sign-compare',
+]
+supported_warning_flags = []
+foreach flag : warning_flags
+ if cc.has_argument(flag)
+ supported_warning_flags += flag
+ endif
+endforeach
+add_project_arguments(supported_warning_flags,
+ language: 'c',
+)
+
+# Strict mode
+if strict_mode
+ add_project_arguments([
+ '-DG_DISABLE_DEPRECATED',
+ '-DGTK_DISABLE_DEPRECATED',
+ '-DGDK_DISABLE_DEPRECATED',
+ '-DGDK_PIXBUF_DISABLE_DEPRECATED',
+ ],
+ language: 'c',
+ )
+endif
+
+# Dependencies
+min_glib_version = '2.44'
+min_gcr_version = '3.11.91'
+min_gpgme_version = '1.7.0'
+accepted_gpg_versions = [ '2.0.12', '2.1.4', '2.2.0' ]
+
+glib_deps = [
+ dependency('glib-2.0', version: '>=' + min_glib_version),
+ dependency('gobject-2.0', version: '>=' + min_glib_version),
+ dependency('gio-2.0', version: '>=' + min_glib_version),
+ dependency('gmodule-2.0', version: '>=' + min_glib_version),
+]
+gtk = dependency('gtk+-3.0', version: '>= 3.4.0')
+gcr = dependency('gcr-3', version: '>=' + min_gcr_version)
+gcr_ui = dependency('gcr-ui-3', version: '>=' + min_gcr_version)
+libsecret = dependency('libsecret-1', version: '>= 0.16')
+posix = valac.find_library('posix')
+ssh_bin = find_program('ssh')
+ssh_keygen = find_program('ssh-keygen')
+
+if with_pgp
+ gpg_check_version = find_program(join_paths('meson', 'gpg_check_version.py'))
+ gpg_bin = find_program('gpg2', 'gpg')
+
+ if check_compatible_gpg
+ gpg_version_check = run_command([gpg_check_version, gpg_bin.path(), 'false', accepted_gpg_versions ])
+ gpg_version = gpg_version_check.stdout()
+ message('GnuPG Version: @0@'.format(gpg_version))
+ if gpg_version_check.returncode() != 0
+ error('Incompatible version of GnuPG. Accepted versions are: @0@'.format(accepted_gpg_versions))
+ endif
+ endif
+
+ gpgme = cc.find_library('gpgme')
+ gpgme_config = find_program('gpgme-config')
+ if check_compatible_gpg
+ gpgme_version_check = run_command([gpg_check_version, gpgme_config.path(), 'true', min_gpgme_version ])
+ gpgme_version = gpgme_version_check.stdout()
+ message('GPGME version: @0@'.format(gpgme_version))
+ if gpgme_version_check.returncode() != 0
+ error('Incompatible version of GPGME. Minimal version required is @0@'.format(min_gpgme_version))
+ endif
+ endif
+endif
+
+if with_pkcs11
+ pkcs11_dep = valac.find_library('pkcs11')
+endif
+
+# XXX check LDAP
+# XXX check HKP
+# XXX check key sharing
+
+# configuration
+conf = configuration_data()
+
+conf.set_quoted('VERSION', meson.project_version())
+conf.set_quoted('PACKAGE', meson.project_name())
+conf.set_quoted('PACKAGE_NAME', meson.project_name())
+conf.set_quoted('PACKAGE_VERSION', meson.project_version())
+conf.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), meson.project_name()))
+conf.set_quoted('PKGDATADIR', pkgdatadir)
+conf.set_quoted('EXECDIR', libexecbindir)
+conf.set_quoted('LOCALEDIR', localedir)
+conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
+conf.set_quoted('G_LOG_DOMAIN', meson.project_name())
+conf.set10('WITH_DEBUG', buildtype.contains('debug'))
+conf.set10('WITH_PGP', with_pgp)
+conf.set10('WITH_PKCS11', with_pkcs11)
+conf.set10('WITH_STRICT', strict_mode)
+conf.set_quoted('SSH_KEYGEN_PATH', ssh_keygen.path())
+conf.set_quoted('SSH_PATH', ssh_bin.path())
+if with_pgp
+ conf.set_quoted('GNUPG', gpg_bin.path())
+ gpg_version_split = gpg_version.split('.')
+ conf.set('GPG_MAJOR', gpg_version_split[0])
+ conf.set('GPG_MINOR', gpg_version_split[1])
+ conf.set('GPG_MICRO', gpg_version_split[2])
+endif
+
+config_file = configure_file(
+ output: 'config.h',
+ configuration: conf,
+)
+
+config = declare_dependency(
+ sources: config_file,
+ dependencies: [
+ valac.find_library('config', dirs: join_paths(meson.source_root(), 'common')),
+ ],
+ include_directories: include_directories('.'),
+)
+
+# RESOURCES
+resources_src = gnome.compile_resources('seahorse-resources',
+ 'seahorse.gresource.xml',
+ c_name: 'seahorse',
+)
+
+# Post-install scripts
+meson.add_install_script(join_paths('meson', 'post_install.py'))
+
+# subdirs
+subdir('po')
+subdir('data')
+subdir('help')
+subdir('common')
+subdir('libegg')
+subdir('gkr')
+subdir('ssh')
+if with_pgp
+ subdir('pgp')
+endif
+if with_pkcs11
+ subdir('pkcs11')
+endif
+subdir('libseahorse')
+subdir('src')
diff --git a/meson/gpg_check_version.py b/meson/gpg_check_version.py
new file mode 100755
index 0000000..b3481b3
--- /dev/null
+++ b/meson/gpg_check_version.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python3
+
+import sys
+import subprocess
+
+# Parses the GPG version from the output of the --version flag.
+# Should work on the output for `gpg`, `gpg2` and `gpgme-config`.
+def parse_version(gpg_output):
+ version_line = gpg_output.splitlines()[0]
+ return version_line.strip().split(' ')[-1]
+
+# Checks whether the GPG version is compatible with the given version.
+# For GPG, this means that the major and minor version should be equal;
+# for GPGME, this means only the major version should be equal.
+def check_version(gpg_version, accepted_version, is_gpgme = False):
+ gpg_major, gpg_minor, gpg_micro = gpg_version.split('.', 2)
+ acc_major, acc_minor, acc_micro = accepted_version.split('.', 2)
+ if is_gpgme:
+ return gpg_major == acc_major and gpg_minor >= acc_minor and gpg_micro >= acc_micro
+ else:
+ return gpg_major == acc_major and gpg_minor == acc_minor and gpg_micro >= acc_micro
+
+if len(sys.argv) <= 3:
+ sys.exit(1)
+
+gpg_path = sys.argv[1]
+is_gpgme = True if sys.argv[2].lower() == 'true' else False
+accepted_versions = sys.argv[3:]
+
+# Parse and print the version
+proc = subprocess.Popen([gpg_path, '--version'],
+ stdout=subprocess.PIPE,
+ universal_newlines=True)
+gpg_version = parse_version(proc.stdout.read())
+print(gpg_version, end='')
+
+# Then return whether we're compatible with that version
+for accepted_version in accepted_versions:
+ if check_version(gpg_version, accepted_version, is_gpgme):
+ sys.exit(0)
+
+sys.exit(1)
diff --git a/meson/post_install.py b/meson/post_install.py
new file mode 100644
index 0000000..bf320a9
--- /dev/null
+++ b/meson/post_install.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+install_prefix = os.environ['MESON_INSTALL_PREFIX']
+icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor')
+schemadir = os.path.join(install_prefix, 'share', 'glib-2.0', 'schemas')
+
+if not os.environ.get('DESTDIR'):
+ print('Update icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas', schemadir])
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..3991894
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,7 @@
+option('pgp-support', type: 'boolean', value: true, description: 'Add support PGP keys')
+option('check-compatible-gpg', type: 'boolean', value: true, description: 'Perform a rudimentary check if
the GPG and GPG versions are compatible')
+option('pkcs11-support', type: 'boolean', value: true, description: 'Add support for PKCS#11 objects')
+option('keyservers-support', type: 'boolean', value: true, description: 'Add support for keyservers')
+option('hkp-support', type: 'boolean', value: true, description: 'Add support for keyservers using LDAP')
+option('ldap-support', type: 'boolean', value: true, description: 'Add support for keyservers using HKP')
+option('strict-mode', type: 'boolean', value: false, description: 'Disable deprecations and make warnings
fatal')
diff --git a/pgp/meson.build b/pgp/meson.build
new file mode 100644
index 0000000..2dd604c
--- /dev/null
+++ b/pgp/meson.build
@@ -0,0 +1,51 @@
+pgp_sources = [
+ 'seahorse-combo-keys.c',
+ 'seahorse-discovery.c',
+ 'seahorse-gpgme.c',
+ 'seahorse-gpgme-add-subkey.c',
+ 'seahorse-gpgme-add-uid.c',
+ 'seahorse-gpgme-data.c',
+ 'seahorse-gpgme-expires.c',
+ 'seahorse-gpgme-exporter.c',
+ 'seahorse-gpgme-generate.c',
+ 'seahorse-gpgme-key.c',
+ 'seahorse-gpgme-key-deleter.c',
+ 'seahorse-gpgme-key-op.c',
+ 'seahorse-gpgme-keyring.c',
+ 'seahorse-gpgme-photo.c',
+ 'seahorse-gpgme-photos.c',
+ 'seahorse-gpgme-revoke.c',
+ 'seahorse-gpgme-secret-deleter.c',
+ 'seahorse-gpgme-sign.c',
+ 'seahorse-gpgme-subkey.c',
+ 'seahorse-gpgme-uid.c',
+ 'seahorse-gpg-op.c',
+ 'seahorse-gpg-options.c',
+ 'seahorse-pgp.c',
+ 'seahorse-pgp-actions.c',
+ 'seahorse-pgp-backend.c',
+ 'seahorse-pgp-key.c',
+ 'seahorse-pgp-key-properties.c',
+ 'seahorse-pgp-keysets.c',
+ 'seahorse-pgp-photo.c',
+ 'seahorse-pgp-signature.c',
+ 'seahorse-pgp-subkey.c',
+ 'seahorse-pgp-uid.c',
+ 'seahorse-signer.c',
+ 'seahorse-transfer.c',
+ 'seahorse-unknown.c',
+ 'seahorse-unknown-source.c',
+]
+
+pgp_dependencies = [
+ glib_deps,
+ gcr,
+ gpgme,
+ config,
+ common_dep,
+]
+
+pgp_lib = static_library('seahorse-pgp',
+ pgp_sources,
+ dependencies: pgp_dependencies,
+)
diff --git a/pkcs11/meson.build b/pkcs11/meson.build
new file mode 100644
index 0000000..3c95f37
--- /dev/null
+++ b/pkcs11/meson.build
@@ -0,0 +1,27 @@
+pkcs11_src = [
+ 'certificate-der-exporter.vala',
+ 'pkcs11-certificate.vala',
+ 'pkcs11-deleter.vala',
+ 'pkcs11-key-deleter.vala',
+ 'pkcs11-module.vala',
+ 'pkcs11-private-key.vala',
+ 'pkcs11-properties.vala',
+ 'pkcs11-request.vala',
+ 'pkcs11-token.vala',
+
+ 'seahorse-pkcs11-backend.c',
+ 'seahorse-pkcs11-generate.c',
+]
+
+pkcs11_deps = [
+ glib_deps,
+ gcr_ui,
+ pkcs11_dep,
+ config,
+ common_dep,
+]
+
+pkcs11_lib = static_library('seahorse-pkcs11',
+ pkcs11_src,
+ dependencies: pkcs11_deps,
+)
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..f904cde
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,3 @@
+i18n.gettext(meson.project_name(),
+ preset: 'glib'
+)
diff --git a/seahorse.gresource.xml b/seahorse.gresource.xml
new file mode 100644
index 0000000..c198b76
--- /dev/null
+++ b/seahorse.gresource.xml
@@ -0,0 +1,27 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<gresources>
+ <gresource prefix="/org/gnome/Seahorse">
+ <file alias="seahorse.css">libseahorse/seahorse.css</file>
+
+ <file alias="seahorse-add-keyserver.ui"
preprocess="xml-stripblanks">libseahorse/seahorse-add-keyserver.ui</file>
+ <file alias="seahorse-prefs.ui" preprocess="xml-stripblanks">libseahorse/seahorse-prefs.ui</file>
+ <file alias="seahorse-progress.ui" preprocess="xml-stripblanks">libseahorse/seahorse-progress.ui</file>
+
+ <!-- Seahorse -->
+ <file alias="seahorse-change-passphrase.ui"
preprocess="xml-stripblanks">src/seahorse-change-passphrase.ui</file>
+ <file alias="seahorse-generate-select.ui"
preprocess="xml-stripblanks">src/seahorse-generate-select.ui</file>
+ <file alias="seahorse-key-manager-widgets.ui"
preprocess="xml-stripblanks">src/seahorse-key-manager-widgets.ui</file>
+ <file alias="seahorse-key-manager.ui" preprocess="xml-stripblanks">src/seahorse-key-manager.ui</file>
+
+ <!-- GKR -->
+ <file alias="seahorse-gkr-add-item.ui" preprocess="xml-stripblanks">gkr/seahorse-gkr-add-item.ui</file>
+ <file alias="seahorse-add-keyring.ui" preprocess="xml-stripblanks">gkr/seahorse-add-keyring.ui</file>
+ <file alias="seahorse-gkr-item-properties.ui"
preprocess="xml-stripblanks">gkr/seahorse-gkr-item-properties.ui</file>
+ <file alias="seahorse-gkr-keyring.ui" preprocess="xml-stripblanks">gkr/seahorse-gkr-keyring.ui</file>
+
+ <!-- SSH -->
+ <file alias="seahorse-ssh-generate.ui" preprocess="xml-stripblanks">ssh/seahorse-ssh-generate.ui</file>
+ <file alias="seahorse-ssh-key-properties.ui"
preprocess="xml-stripblanks">ssh/seahorse-ssh-key-properties.ui</file>
+ <file alias="seahorse-ssh-upload.ui" preprocess="xml-stripblanks">ssh/seahorse-ssh-upload.ui</file>
+ </gresource>
+</gresources>
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..602e5a7
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,42 @@
+seahorse_sources = [
+ 'seahorse-generate-select.c',
+ 'seahorse-import-dialog.c',
+ 'seahorse-key-manager.c',
+ 'seahorse-main.c',
+ 'seahorse-sidebar.c',
+ resources_src, # defined in /meson.build
+]
+
+seahorse_dependencies = [
+ glib_deps,
+ gtk,
+ gcr,
+ config,
+ common_dep,
+ libseahorse_dep,
+]
+
+seahorse_linkedlibs = [
+ libeggdatetime_lib,
+ libtreemultidnd_lib,
+ gkr_lib,
+ ssh_lib,
+]
+
+if with_pgp
+ seahorse_linkedlibs += pgp_lib
+endif
+if with_pkcs11
+ seahorse_linkedlibs += pkcs11_lib
+endif
+
+
+seahorse_exe = executable('seahorse',
+ seahorse_sources,
+ dependencies: seahorse_dependencies,
+ link_with: seahorse_linkedlibs,
+ install: true,
+)
+
+# Manpage
+install_man('seahorse.1')
diff --git a/src/seahorse-main.c b/src/seahorse-main.c
index dcc34f2..95874b5 100644
--- a/src/seahorse-main.c
+++ b/src/seahorse-main.c
@@ -86,7 +86,7 @@ main (int argc, char **argv)
g_type_init ();
#endif
- seahorse_register_resource ();
+ // XXX seahorse_register_resource ();
application = seahorse_application_new ();
g_signal_connect (application, "activate", G_CALLBACK (on_application_activate), NULL);
diff --git a/ssh/meson.build b/ssh/meson.build
new file mode 100644
index 0000000..005f0e2
--- /dev/null
+++ b/ssh/meson.build
@@ -0,0 +1,49 @@
+ssh_sources = [
+ 'actions.vala',
+ 'algorithm.vala',
+ 'backend.vala',
+ 'deleter.vala',
+ 'errors.vala',
+ 'exporter.vala',
+ 'generate.vala',
+ 'key-data.vala',
+ 'key-properties.vala',
+ 'key.vala',
+ 'operation.vala',
+ 'source.vala',
+ 'ssh.vala',
+ 'upload.vala',
+]
+
+ssh_dependencies = [
+ glib_deps,
+ gcr,
+ posix,
+ gtk,
+ config,
+ common_dep,
+]
+
+ssh_lib = static_library('seahorse-ssh',
+ ssh_sources,
+ dependencies: ssh_dependencies,
+)
+
+# ssh-askpass helper binary
+ssh_askpass_sources = [
+ 'seahorse-ssh-askpass.c',
+ join_paths(meson.source_root(), 'libseahorse', 'seahorse-passphrase.c'),
+]
+
+ssh_askpass_dependencies = [
+ gcr,
+ gtk,
+ config,
+]
+
+ssh_askpass = executable('ssh-askpass',
+ ssh_askpass_sources,
+ dependencies: ssh_askpass_dependencies,
+ install: true,
+ install_dir: libexecbindir,
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]