[gnome-online-accounts/wip/inigomartinez/meson] build: Port to meson build system



commit 41d3dfa569759be17c1bbbe93f39b44bf014734b
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Sat Sep 9 20:05:07 2017 +0200

    build: Port to meson build system
    
    meson is a build system focused on speed an ease of use, which
    speeds up software development by the developer.

 data/icons/meson.build      |   34 +++
 data/meson.build            |   37 +++
 doc/meson.build             |   64 +++++
 meson.build                 |  581 +++++++++++++++++++++++++++++++++++++++++++
 meson_options.txt           |   33 +++
 meson_post_install.py       |   21 ++
 po/meson.build              |    1 +
 src/daemon/meson.build      |   21 ++
 src/examples/meson.build    |   24 ++
 src/goa/goaconfig.h.in      |   17 ++
 src/goa/meson.build         |  146 +++++++++++
 src/goabackend/meson.build  |  187 ++++++++++++++
 src/goaidentity/meson.build |   90 +++++++
 src/meson.build             |   13 +
 14 files changed, 1269 insertions(+), 0 deletions(-)
---
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000..cf48d14
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,34 @@
+icon_data = [
+  'goa-account.png',
+  'goa-account-facebook.png',
+  'goa-account-flickr.png',
+  'goa-account-google.png',
+  'goa-account-msn.png',
+  'goa-account-owncloud.png',
+  'goa-account-pocket.png',
+  'goa-account-foursquare.png',
+  'goa-account-todoist.png'
+]
+
+icon_data_256 = ['goa-account.png']
+
+icons = [
+  ['16x16', icon_data],
+  ['22x22', icon_data],
+  ['24x24', icon_data],
+  ['32x32', icon_data],
+  ['48x48', icon_data],
+  ['96x96', icon_data],
+  ['256x256', icon_data_256]
+]
+
+foreach icon: icons
+  icon_dir = join_paths(goa_datadir, 'icons', 'hicolor', icon[0], 'apps')
+
+  foreach data: icon[1]
+    install_data(
+      join_paths(icon[0], data),
+      install_dir: icon_dir
+    )
+  endforeach
+endforeach
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..c2096ab
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,37 @@
+subdir('icons')
+
+if enable_backend
+  schema_conf = configuration_data()
+  schema_conf.set('GETTEXT_PACKAGE', goa_name)
+
+  schema = 'org.gnome.online-accounts.gschema.xml'
+
+  configure_file(
+    input: schema + '.in',
+    output: schema,
+    install: true,
+    install_dir: join_paths(goa_datadir, 'glib-2.0', 'schemas'),
+    configuration: schema_conf
+  )
+endif
+
+services = ['org.gnome.OnlineAccounts.service']
+
+if have_kerberos
+  services += 'org.gnome.Identity.service'
+endif
+
+foreach service: services
+  service_conf = configuration_data()
+  service_conf.set('libexecdir', goa_libexecdir)
+
+  configure_file(
+    input: service + '.in',
+    output: service,
+    install: true,
+    install_dir: join_paths(goa_datadir, 'dbus-1', 'services'),
+    configuration: service_conf
+  )
+endforeach
+
+dbus_interfaces = files('dbus-interfaces.xml')
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..b02a83a
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,64 @@
+if enable_gtk_doc
+  # FIXME: workaround due to problems when generating a new goa.types file
+  install_data(
+    'goa.types',
+    install_dir: meson.current_build_dir()
+  )
+
+  version_conf = configuration_data()
+  version_conf.set('VERSION', goa_version)
+
+  version_xml = 'version.xml'
+
+  configure_file(
+    input: version_xml + '.in',
+    output: version_xml,
+    configuration: version_conf
+  )
+
+  doc_path = join_paths(goa_datadir, 'gtk-doc', 'html', goa_short_name)
+
+  # FIXME: fails due to missing goa-generated-doc-org.gnome.OnlineAccounts.Account.xml
+  #        gdbus_codegen must support --generate-docbook goa-generated-doc parameter
+  gnome.gtkdoc(
+    goa_short_name,
+    main_xml: goa_short_name + '-docs.xml',
+    src_dir: src_inc,
+    dependencies: [
+      libgoa_dep,
+      libgoa_backend_dep
+    ],
+    #scan_args: '--rebuild-types',
+    mkdb_args: [
+      '--name-space=' + goa_short_name,
+      '--sgml-mode',
+      '--output-format=xml'
+    ],
+    #gobject_typesfile: goa_short_name + '.types',
+    install: true,
+    install_dir: doc_path
+  )
+endif
+
+if get_option('enable-documentation')
+  xsltproc_cmd = [
+    find_program('xsltproc'),
+    '--output', '@OUTPUT@',
+    '--nonet',
+    '--stringparam', 'man.output.quietly', '1',
+    '--stringparam', 'funcsynopsis.style', 'ansi',
+    'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+    '@INPUT@'
+  ]
+
+  man = 'goa-daemon'
+
+  custom_target(
+    man + '.8',
+    input: man + '.xml',
+    output: man + '.8',
+    command: xsltproc_cmd,
+    install: true,
+    install_dir: join_paths(goa_mandir, 'man8')
+  )
+endif
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..8ced03d
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,581 @@
+project(
+  'GNOME Online Accounts', 'c',
+  version: '3.25.92',
+  license: 'LGPL2+',
+  default_options: [
+    'buildtype=debugoptimized',
+    'warning_level=1'
+  ],
+  meson_version: '>= 0.43.0'
+)
+
+goa_name = 'gnome-online-accounts'
+
+goa_version = meson.project_version()
+version_array = goa_version.split('.')
+goa_major_version = version_array[0].to_int()
+goa_minor_version = version_array[1].to_int()
+goa_micro_version = version_array[2].to_int()
+
+goa_short_name = 'goa'
+goa_api_version = '1.0'
+goa_api_name = '@0@-@1@'.format(goa_short_name, goa_api_version)
+goa_backend_api_name = '@0@-backend-@1@'.format(goa_short_name, goa_api_version)
+
+goa_gir_name = 'Goa'
+goa_gir_version = '1.0'
+
+goa_prefix = get_option('prefix')
+goa_bindir = join_paths(goa_prefix, get_option('bindir'))
+goa_datadir = join_paths(goa_prefix, get_option('datadir'))
+goa_includedir = join_paths(goa_prefix, get_option('includedir'))
+goa_libdir = join_paths(goa_prefix, get_option('libdir'))
+goa_libexecdir = join_paths(goa_prefix, get_option('libexecdir'))
+goa_localedir = join_paths(goa_prefix, get_option('localedir'))
+goa_localstatedir = join_paths(goa_prefix, get_option('localstatedir'))
+goa_mandir = join_paths(goa_prefix, get_option('mandir'))
+goa_sbindir = join_paths(goa_prefix, get_option('sbindir'))
+goa_sysconfdir = join_paths(goa_prefix, get_option('sysconfdir'))
+
+goa_pkgdatadir = join_paths(goa_datadir, goa_name)
+goa_pkgincludedir = join_paths(goa_includedir, goa_api_name)
+goa_pkglibdir = join_paths(goa_libdir, goa_api_name)
+
+# Before making a release, the LT_VERSION string should be modified.
+# The string is of the form C:R:A.
+# - If interfaces have been changed or added, but binary compatibility has
+#   been preserved, change to C+1:0:A+1
+# - If binary compatibility has been broken (eg removed or changed interfaces)
+#   change to C+1:0:0
+# - If the interface is the same as the previous version, change to C:R+1:A
+#
+# libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
+goa_libversion = '0.0.0'
+goa_backend_libversion = '1.0.0'
+
+goa_debug = get_option('buildtype').contains('debug')
+
+cc = meson.get_compiler('c')
+
+config_h = configuration_data()
+
+# quoted defines
+set_defines = [
+  # package
+  ['PACKAGE', goa_name],
+  ['PACKAGE_BUGREPORT', 'https://bugzilla.gnome.org/enter_bug.cgi?product=' + goa_name],
+  ['PACKAGE_NAME', meson.project_name()],
+  ['PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), goa_version)],
+  ['PACKAGE_TARNAME', goa_name],
+  ['PACKAGE_URL', ''],
+  ['PACKAGE_VERSION', goa_version],
+  ['VERSION', goa_version],
+  # i18n
+  ['GETTEXT_PACKAGE', goa_name]
+]
+
+foreach define: set_defines
+  config_h.set_quoted(define[0], define[1])
+endforeach
+
+# version values
+config_h.set('GOA_MAJOR_VERSION', goa_major_version)
+config_h.set('GOA_MINOR_VERSION', goa_minor_version)
+config_h.set('GOA_MICRO_VERSION', goa_micro_version)
+
+# debug options
+config_h.set('GNOME_ENABLE_DEBUG', goa_debug)
+config_h.set('NDEBUG', not goa_debug)
+
+# headers
+check_headers = [
+  ['HAVE_DLFCN_H', 'dlfcn.h'],
+  ['HAVE_INTTYPES_H', 'inttypes.h'],
+  ['HAVE_LOCALE_H', 'locale.h'],
+  ['HAVE_MEMORY_H', 'memory.h'],
+  ['HAVE_STDINT_H', 'stdint.h'],
+  ['HAVE_STDLIB_H', 'stdlib.h'],
+  ['HAVE_STRINGS_H', 'strings.h'],
+  ['HAVE_STRING_H', 'string.h'],
+  ['HAVE_SYS_STAT_H', 'sys/stat.h'],
+  ['HAVE_SYS_TYPES_H', 'sys/types.h'],
+  ['HAVE_UNISTD_H', 'unistd.h']
+]
+
+foreach header: check_headers
+  config_h.set(header[0], cc.has_header(header[1]))
+endforeach
+
+# functions
+check_functions = [
+  # i18n
+  ['HAVE_DCGETTEXT', 'dcgettext'],
+  ['HAVE_GETTEXT', 'gettext'],
+  ['HAVE_ICONV', 'iconv']
+]
+
+if host_machine.system().contains('darwin')
+  check_functions += [
+    ['HAVE_CFLOCALECOPYCURRENT', 'CFLocaleCopyCurrent'],
+    ['HAVE_CFPREFERENCESCOPYAPPVALUE', 'CFPreferencesCopyAppValue']
+  ]
+endif
+
+foreach func: check_functions
+  config_h.set(func[0], cc.has_function(func[1]))
+endforeach
+
+# symbols
+check_symbols = [
+  # i18n
+  ['HAVE_LC_MESSAGES', 'locale.h', 'LC_MESSAGES'],
+  ['HAVE_BIND_TEXTDOMAIN_CODESET', 'libintl.h', 'bind_textdomain_codeset']
+]
+
+foreach symbol: check_symbols
+  config_h.set(symbol[0], cc.has_header_symbol(symbol[1], symbol[2]))
+endforeach
+
+# compiler flags
+common_flags = [
+  '-DHAVE_CONFIG_H',
+  '-DPACKAGE_LIBEXEC_DIR="@0@"'.format(goa_libexecdir),
+  '-DPACKAGE_SYSCONF_DIR="@0@"'.format(goa_sysconfdir),
+  '-DPACKAGE_DATA_DIR="@0@"'.format(goa_pkgdatadir),
+  '-DPACKAGE_BIN_DIR="@0@"'.format(goa_bindir),
+  '-DPACKAGE_LOCALSTATE_DIR="@0@"'.format(goa_localstatedir),
+  '-DPACKAGE_LOCALE_DIR="@0@"'.format(goa_localedir),
+  '-DPACKAGE_LIB_DIR="@0@"'.format(goa_libdir),
+  '-D_POSIX_PTHREAD_SEMANTICS',
+  '-D_REENTRANT'
+]
+compiler_flags = []
+
+if goa_debug
+  test_flags = [
+    '-Werror=format=2',
+    '-Werror=implicit-function-declaration',
+    '-Werror=init-self',
+    '-Werror=missing-include-dirs',
+    '-Werror=missing-prototypes',
+    '-Werror=pointer-arith',
+    '-Werror=return-type',
+    '-Wnested-externs',
+    '-Wstrict-prototypes'
+  ]
+
+  foreach flag: test_flags
+    if cc.has_argument(flag)
+      compiler_flags += [flag]
+    endif
+  endforeach
+endif
+
+add_project_arguments(common_flags + compiler_flags, language: 'c')
+
+# Libraries
+glib_req_version = '>= 2.52'
+
+glib_deps = [
+  dependency('glib-2.0', version: glib_req_version),
+  dependency('gio-2.0', version: glib_req_version),
+  dependency('gio-unix-2.0', version: glib_req_version)
+]
+
+# introspection support
+enable_introspection = get_option('enable-introspection')
+have_gir = false
+
+if enable_introspection != 'no'
+  gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.6.7', required: (enable_introspection == 
'yes'))
+  have_gir = gir_dep.found()
+endif
+
+# Telepathy
+# FIXME: telepathy is hard coded to false
+enable_telepathy = false
+config_h.set('GOA_TELEPATHY_ENABLED', enable_telepathy,
+             description: 'Enable Telepathy data provider')
+
+enable_backend = get_option('enable-backend')
+if enable_backend
+  gtk_dep = dependency('gtk+-3.0', version: '>= 3.19.12')
+  webkit_gtk_dep = dependency('webkit2gtk-4.0', version: '>= 2.7.2')
+  libsoup_dep = dependency('libsoup-2.4', version: '>= 2.42')
+  json_glib_dep = dependency('json-glib-1.0')
+  rest_dep = dependency('rest-0.7')
+  libsecret_dep = dependency('libsecret-1')
+  libxml_dep = dependency('libxml-2.0')
+
+  if enable_telepathy
+    telepathy_glib_dep = dependency('telepathy-glib')
+
+    # FIXME: This should be fixed if telepathy-accounts-widgets meson port is accepted
+    #        https://bugzilla.gnome.org/show_bug.cgi?id=786969
+    '''
+    telepathy_accounts_widgets = subproject(
+      'telepathy-accounts-widgets'
+      default_options: [
+        'enable-settings=false',
+        'enable-gudev=no',
+        'with-cheese=no',
+        'enable-ubuntu-online-accounts=no',
+        # install the data together with the rest of GOA's data
+        'with-pkgdatadir=' + goa_pkgdatadir
+        # GOA ships its icons directly in ${datadir}/icons (usually /usr/share/icons/) and not
+        # in its own data directory
+        'with-icondir=' + join_paths(goa_datadir, 'icons'),
+        # Change the name of tpaw's .mo files to avoid conflicts with other packages using tp-aw
+        #ac_configure_args="$ac_configure_args --with-gettext-package=gnome-online-accounts-tpaw"
+        # Disable the installation of the GSettings schema to avoid multiple components shipping
+        # the same file. See https://bugzilla.gnome.org/show_bug.cgi?id=706803
+        #ac_configure_args="$ac_configure_args --disable-schemas-compiles"
+      ]
+    )
+    '''
+    #telepathy_accounts_widgets_dep = telepathy_accounts_widgets.get_variable('libtp_account_widgets_dep')
+  endif
+endif
+
+config_h.set('GOA_BACKEND_ENABLED', enable_backend,
+             description: 'Enable goabackend library')
+
+enable_inspector = get_option('enable-inspector')
+config_h.set('GOA_INSPECTOR_ENABLED', enable_inspector,
+             description: 'Enable a WebKitWebInspector for the embedded web view')
+
+template_file = get_option('with-template-file').strip()
+config_h.set_quoted('GOA_TEMPLATE_FILE', template_file,
+                    description: 'Path to the template file')
+
+# service providers
+goa_name_desc = 'ProviderType and extension point name'
+
+# Microsoft Exchange
+enable_exchange = get_option('enable-exchange')
+if enable_exchange
+  config_h.set_quoted('GOA_EXCHANGE_NAME', 'exchange', description: goa_name_desc)
+endif
+config_h.set('GOA_EXCHANGE_ENABLED', enable_exchange,
+             description: 'Enable Microsoft Exchange data provider')
+
+enable_flickr = get_option('enable-flickr')
+if enable_flickr
+  config_h.set_quoted('GOA_FLICKR_NAME', 'flickr', description: goa_name_desc)
+
+  flickr_consumer_key = get_option('with-flickr-consumer-key').strip()
+  if flickr_consumer_key == ''
+    flickr_consumer_key = 'ed00ad7e0869897506e23c0d18e34d01'
+  endif
+  config_h.set_quoted('GOA_FLICKR_CONSUMER_KEY', flickr_consumer_key,
+                      description: 'Flickr OAuth 1.0 consumer key')
+
+  flickr_consumer_secret = get_option('with-flickr-consumer-secret').strip()
+  if flickr_consumer_secret == ''
+    flickr_consumer_secret = 'ebd556dd187188b1'
+  endif
+  config_h.set_quoted('GOA_FLICKR_CONSUMER_SECRET', flickr_consumer_secret,
+                      description: 'Flickr OAuth 1.0 consumer secret')
+endif
+
+config_h.set('GOA_FLICKR_ENABLED', enable_flickr,
+             description: 'Enable Flickr data provider')
+
+# Foursquare
+enable_foursquare = get_option('enable-foursquare')
+if enable_foursquare
+  config_h.set_quoted('GOA_FOURSQUARE_NAME', 'foursquare', description: goa_name_desc)
+
+  foursquare_client_id = get_option('with-foursquare-client-id').strip()
+  if foursquare_client_id == ''
+    foursquare_client_id = 'MBNU2NES5HASNDQJ25YPFGG2UGRZHPI3IYTNJGE0KIWT2HCF'
+  endif
+  config_h.set_quoted('GOA_FOURSQUARE_CLIENT_ID', foursquare_client_id,
+                      description: 'Foursquare OAuth 2.0 client id')
+endif
+
+config_h.set('GOA_FOURSQUARE_ENABLED', enable_foursquare,
+             description: 'Enable Foursquare data provider')
+
+# Google
+enable_google = get_option('enable-google')
+if enable_google
+  config_h.set_quoted('GOA_GOOGLE_NAME', 'google', description: goa_name_desc)
+
+  google_client_id = get_option('with-google-client-id').strip()
+  if google_client_id == ''
+    google_client_id = '44438659992-7kgjeitenc16ssihbtdjbgguch7ju55s.apps.googleusercontent.com'
+  endif
+  config_h.set_quoted('GOA_GOOGLE_CLIENT_ID', google_client_id,
+                      description: 'Google OAuth 2.0 client id')
+
+  google_client_secret = get_option('with-google-client-secret').strip()
+  if google_client_secret == ''
+    google_client_secret = '-gMLuQyDiI0XrQS_vx_mhuYF'
+  endif
+  config_h.set_quoted('GOA_GOOGLE_CLIENT_SECRET', google_client_secret,
+                      description: 'Google OAuth 2.0 client secret')
+endif
+
+config_h.set('GOA_GOOGLE_ENABLED', enable_google,
+             description: 'Enable Google data provider')
+
+# IMAP/SMTP
+enable_imap_smtp = get_option('enable-imap-smtp')
+if enable_imap_smtp
+  config_h.set_quoted('GOA_IMAP_SMTP_NAME', 'imap_smtp', description: goa_name_desc)
+endif
+
+config_h.set('GOA_IMAP_SMTP_ENABLED', enable_imap_smtp,
+             description: 'Enable IMAP/SMTP data provider')
+
+# Media Server
+enable_media_server = get_option('enable-media-server')
+if enable_media_server
+  config_h.set_quoted('GOA_MEDIA_SERVER_NAME', 'media-server', description: goa_name_desc)
+endif
+
+config_h.set('GOA_MEDIA_SERVER_ENABLED', enable_media_server,
+             description: 'Enable Media Server provider')
+
+# ownCloud
+enable_owncloud = get_option('enable-owncloud')
+if enable_owncloud
+  config_h.set_quoted('GOA_OWNCLOUD_NAME', 'owncloud', description: goa_name_desc)
+endif
+
+config_h.set('GOA_OWNCLOUD_ENABLED', enable_owncloud,
+             description: 'Enable ownCloud data provider')
+
+
+# Facebook
+enable_facebook = get_option('enable-facebook')
+if enable_facebook
+  config_h.set_quoted('GOA_FACEBOOK_NAME', 'facebook', description: goa_name_desc)
+
+  facebook_client_id = get_option('with-facebook-client-id').strip()
+  if facebook_client_id == ''
+    facebook_client_id = '297654143624603'
+  endif
+  config_h.set_quoted('GOA_FACEBOOK_CLIENT_ID', facebook_client_id,
+                      description: 'Facebook OAuth 2.0 client id')
+endif
+
+config_h.set('GOA_FACEBOOK_ENABLED', enable_facebook,
+             description: 'Enable Facebook data provider')
+
+# Todoist
+enable_todoist = get_option('enable-todoist')
+if enable_todoist
+  config_h.set_quoted('GOA_TODOIST_NAME', 'todoist', description: goa_name_desc)
+
+  todoist_client_id = get_option('with-todoist-client-id').strip()
+  if todoist_client_id == ''
+    todoist_client_id = '2e41575c1dd74f98ad7cfb178e1ba3dd'
+  endif
+  config_h.set_quoted('GOA_TODOIST_CLIENT_ID', todoist_client_id,
+                      description: 'Todoist OAuth 2.0 client id')
+
+  todoist_client_secret = get_option('with-todoist-client-secret').strip()
+  if todoist_client_secret == ''
+    todoist_client_secret = '3e59831ffdd64633918d19aa0a1efd2b'
+  endif
+  config_h.set_quoted('GOA_TODOIST_CLIENT_SECRET', todoist_client_secret,
+                      description: 'Todoist client secret')
+endif
+
+config_h.set('GOA_TODOIST_ENABLED', enable_todoist,
+             description: 'Enable Todoist data provider')
+
+# Windows Live
+enable_windows_live = get_option('enable-windows-live')
+if enable_windows_live
+  config_h.set_quoted('GOA_WINDOWS_LIVE_NAME', 'windows_live', description: goa_name_desc)
+
+  windows_live_client_id = get_option('with-windows-live-client-id').strip()
+  if windows_live_client_id == ''
+    windows_live_client_id = '0000000044067703'
+  endif
+  config_h.set_quoted('GOA_WINDOWS_LIVE_CLIENT_ID', windows_live_client_id,
+                      description: 'Windows Live OAuth 2.0 client id')
+endif
+
+config_h.set('GOA_WINDOWS_LIVE_ENABLED', enable_windows_live,
+             description: 'Enable Windows Live data provider')
+
+# Pocket
+enable_pocket = get_option('enable-pocket')
+if enable_pocket
+  config_h.set_quoted('GOA_POCKET_NAME', 'pocket', description: goa_name_desc)
+
+  pocket_client_id = get_option('with-pocket-client-id').strip()
+  if pocket_client_id == ''
+    pocket_client_id = '16630-40b25246b56e8ad5310b2883'
+  endif
+  config_h.set_quoted('GOA_POCKET_CLIENT_ID', pocket_client_id,
+                      description: 'Pocket OAuth 2.0 client id')
+endif
+
+config_h.set('GOA_POCKET_ENABLED', enable_pocket,
+             description: 'Enable Pocket data provider')
+
+# Kerberos
+enable_kerberos = get_option('enable-kerberos')
+have_kerberos = false
+
+if enable_kerberos != 'no'
+  krb5_dep = dependency('krb5', required: false)
+  if krb5_dep.found()
+    gcr_dep = dependency('gcr-3', required: false)
+    have_kerberos = gcr_dep.found()
+
+    if have_kerberos
+      config_h.set_quoted('GOA_KERBEROS_NAME', 'kerberos', description: goa_name_desc)
+      config_h.set('GCR_API_SUBJECT_TO_CHANGE', true,
+                   description: 'Define to use the GCR API')
+    endif
+  endif
+
+  assert(have_kerberos or enable_kerberos != 'yes', 'kerberos support requested, but not available')
+endif
+
+config_h.set('GOA_KERBEROS_ENABLED', enable_kerberos,
+             description: 'Enable Kerberos data provider')
+
+# Last.fm
+enable_lastfm = get_option('enable-lastfm')
+if enable_lastfm
+  config_h.set_quoted('GOA_LASTFM_NAME', 'lastfm', description: goa_name_desc)
+
+  lastfm_client_id = get_option('with-lastfm-client-id').strip()
+  if lastfm_client_id == ''
+    lastfm_client_id = '7a2461fe34c9c8124fb28ac750ba12fa'
+  endif
+  config_h.set_quoted('GOA_LASTFM_CLIENT_ID', lastfm_client_id,
+                      description: 'LastFM client id')
+
+  lastfm_client_secret = get_option('with-lastfm-client-secret').strip()
+  if lastfm_client_secret == ''
+    lastfm_client_secret = '49ec391644459c417f3afe57ca246c5a'
+  endif
+  config_h.set_quoted('GOA_LASTFM_CLIENT_SECRET', lastfm_client_secret,
+                      description: 'LastFM client secret')
+endif
+
+config_h.set('GOA_LASTFM_ENABLED', enable_todoist,
+             description: 'Enable LastFM data provider')
+
+# Optional timerfd support
+timerfd_support = '''
+  #include <sys/timerfd.h>
+  #include <unistd.h>
+  int
+  main (void)
+  {
+    struct itimerspec timer_spec = { 0 };
+    timerfd_settime (timerfd_create (CLOCK_MONOTONIC, TFD_CLOEXEC),
+                     TFD_TIMER_ABSTIME,
+                     &timer_spec,
+                     NULL);
+
+    return 0;
+  };
+'''
+
+have_timerfd = cc.compiles(timerfd_support)
+message('timerfd support: ' + have_timerfd.to_string())
+config_h.set('HAVE_TIMERFD', have_timerfd,
+             description: 'have timerfd support')
+
+if have_timerfd
+  # libc headers tend to trail kernel support
+  # so compensate if necessary
+  timerfd_cancel_on_set_support = '''
+    #include <sys/timerfd.h>
+    #include <unistd.h>
+    int
+    main (void)
+    {
+      struct itimerspec timer_spec = { 0 };
+      timerfd_settime (timerfd_create (CLOCK_MONOTONIC, TFD_CLOEXEC),
+                       TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET,
+                       &timer_spec,
+                       NULL);
+
+      return 0;
+    };
+  '''
+  have_timerfd_cancel_on_set = cc.compiles(timerfd_cancel_on_set_support)
+  message('timerfd cancel-on-set support ' + have_timerfd_cancel_on_set.to_string())
+  if not have_timerfd_cancel_on_set
+    config_h.set('TFD_TIMER_CANCEL_ON_SET', '(1 << 1)',
+                 description: 'have timerfd cancel on set support')
+  endif
+endif
+
+# FIXME: this should be located somewhere
+enable_gtk_doc = get_option('enable-gtk-doc')
+enable_vala = get_option('enable-vala')
+
+configure_file(
+  output: 'config.h',
+  configuration: config_h
+)
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+
+po_dir = join_paths(meson.source_root(), 'po')
+
+intltool_merge = find_program('intltool-merge')
+intltool_cache = join_paths(po_dir, '.intltool-merge-cache')
+intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+
+top_inc = include_directories('.')
+
+subdir('data')
+subdir('src')
+
+if enable_backend
+  subdir('doc')
+endif
+
+subdir('po')
+
+meson.add_install_script('meson_post_install.py', goa_datadir)
+
+output = '\n        gnome-online-accounts ' + goa_version + '\n'
+output += '        =============================\n'
+output += '        prefix:                         ' + goa_prefix + '\n'
+output += '        libdir:                         ' + goa_libdir + '\n'
+output += '        libexecdir:                     ' + goa_libexecdir + '\n'
+output += '        bindir:                         ' + goa_bindir + '\n'
+output += '        sbindir:                        ' + goa_sbindir + '\n'
+output += '        datadir:                        ' + goa_datadir + '\n'
+output += '        sysconfdir:                     ' + goa_sysconfdir + '\n'
+output += '        localstatedir:                  ' + goa_localstatedir + '\n\n'
+output += '        compiler:                       ' + cc.get_id() + '\n'
+output += '        cflags:                         ' + ' '.join(compiler_flags) + '\n\n'
+output += '        backend:                        ' + enable_backend.to_string() + '\n'
+output += '        inspector:                      ' + enable_inspector.to_string() + '\n'
+output += '        introspection:                  ' + have_gir.to_string() + '\n'
+output += '        template file:                  ' + template_file + '\n\n'
+output += '        Flickr provider:                ' + enable_flickr.to_string() + ' (OAuth 1.0, key:' + 
flickr_consumer_key + ')\n'
+output += '        Foursquare provider:            ' + enable_foursquare.to_string() + ' (id:' + 
foursquare_client_id + ')\n'
+output += '        Google provider:                ' + enable_google.to_string() + ' (OAuth 2.0, id:' + 
google_client_id + ' secret:' + google_client_secret + ')\n'
+output += '        IMAP/SMTP provider:             ' + enable_imap_smtp.to_string() + '\n'
+output += '        Media Server provider:          ' + enable_media_server.to_string() + '\n'
+output += '        Microsoft Exchange provider:    ' + enable_exchange.to_string() + '\n'
+output += '        ownCloud provider:              ' + enable_owncloud.to_string() + '\n'
+output += '        Kerberos provider:              ' + have_kerberos.to_string() + '\n'
+output += '        Facebook provider:              ' + enable_facebook.to_string() + ' (OAuth 2.0, id:' + 
facebook_client_id + ')\n'
+output += '        Todoist provider:               ' + enable_todoist.to_string() + ' (OAuth 2.0, id:' + 
todoist_client_id + ' secret:' + todoist_client_secret + ')\n'
+output += '        Windows Live provider:          ' + enable_windows_live.to_string() + ' (OAuth 2.0, id:' 
+ windows_live_client_id + ')\n'
+output += '        Telepathy provider:             ' + enable_telepathy.to_string() + '\n'
+output += '        Pocket provider:                ' + enable_pocket.to_string() + ' (id:' + 
pocket_client_id + ')\n'
+output += '        Last.fm provider:               ' + enable_lastfm.to_string() + ' (id:' + 
lastfm_client_id + ' secret:' + lastfm_client_secret + ')\n\n'
+#output += '        Maintainer mode:                ${USE_MAINTAINER_MODE}
+output += '        Building api docs:              ' + enable_gtk_doc.to_string()
+message(output)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..2b96530
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,33 @@
+option('enable-telepathy', type: 'boolean', value: true, description: 'Enable Telepathy IM provider')
+option('enable-backend', type: 'boolean', value: true, description: 'Enable goabackend library')
+option('enable-inspector', type: 'boolean', value: true, description: 'Enable a WebKitWebInspector for the 
embedded web view')
+option('enable-exchange', type: 'boolean', value: true, description: 'Enable Microsoft Exchange provider')
+option('enable-flickr', type: 'boolean', value: true, description: 'Enable Flickr provider')
+option('enable-foursquare', type: 'boolean', value: true, description: 'Enable Foursquare provider')
+option('enable-google', type: 'boolean', value: true, description: 'Enable Google provider')
+option('enable-imap-smtp', type: 'boolean', value: true, description: 'Enable IMAP/SMTP provider')
+option('enable-media-server', type: 'boolean', value: true, description: 'Enable Media Server provider')
+option('enable-owncloud', type: 'boolean', value: true, description: 'Enable ownCloud provider')
+option('enable-facebook', type: 'boolean', value: true, description: 'Enable Facebook provider')
+option('enable-todoist', type: 'boolean', value: true, description: 'Enable Todoist provider')
+option('enable-windows-live', type: 'boolean', value: true, description: 'Enable Windows Live provider')
+option('enable-pocket', type: 'boolean', value: true, description: 'Enable Pocket provider')
+option('enable-kerberos', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable 
kerberos provider')
+option('enable-lastfm', type: 'boolean', value: true, description: 'Enable Last.fm provider')
+option('with-flickr-consumer-key', type: 'string', value: '', description: 'Flickr OAuth 1.0 consumer key')
+option('with-flickr-consumer-secret', type: 'string', value: '', description: 'Flickr OAuth 1.0 consumer 
secret')
+option('with-foursquare-client-id', type: 'string', value: '', description: 'Foursquare OAuth 2.0 client id')
+option('with-google-client-id', type: 'string', value: '', description: 'Google OAuth 2.0 client id')
+option('with-google-client-secret', type: 'string', value: '', description: 'Google OAuth 2.0 client secret')
+option('with-facebook-client-id', type: 'string', value: '', description: 'Facebook OAuth 2.0 client id')
+option('with-todoist-client-id', type: 'string', value: '', description: 'Todoist OAuth 2.0 client id')
+option('with-todoist-client-secret', type: 'string', value: '', description: 'Todoist client secret')
+option('with-windows-live-client-id', type: 'string', value: '', description: 'Windows Live OAuth 2.0 client 
id')
+option('with-pocket-client-id', type: 'string', value: '', description: 'Pocket OAuth 2.0 client id')
+option('with-lastfm-client-id', type: 'string', value: '', description: 'Last.fm client id')
+option('with-lastfm-client-secret', type: 'string', value: '', description: 'Last.fm client secret')
+option('with-template-file', type: 'string', value: '', description: 'Path to the template file')
+option('enable-documentation', type: 'boolean', value: true, description: 'enable man pages and HTML')
+option('enable-gtk-doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
+option('enable-introspection', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 
'Enable GObject Introspection (depends on GObject)')
+option('enable-vala', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'build Vala 
binding')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..e69bbd0
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import glob
+import os
+import subprocess
+import sys
+
+if not os.environ.get('DESTDIR'):
+  icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
+  print('Update icon cache...')
+  subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+
+  schemadir = os.path.join(sys.argv[1], 'glib-2.0', 'schemas')
+  print('Compiling gsettings schemas...')
+  subprocess.call(['glib-compile-schemas', schemadir])
+
+  #desktopdir = os.path.join(sys.argv[1], 'applications')
+  #search_pattern = '/*.desktop'
+  #print('Validate desktop files...')
+  #[subprocess.call(['desktop-file-validate', file])
+   # for file in glob.glob(desktopdir + search_pattern, recursive=False)]
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..adb016f
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(goa_name, preset: 'glib')
diff --git a/src/daemon/meson.build b/src/daemon/meson.build
new file mode 100644
index 0000000..5d5e867
--- /dev/null
+++ b/src/daemon/meson.build
@@ -0,0 +1,21 @@
+sources = files(
+  'goadaemon.c',
+  'main.c'
+)
+
+cflags = [
+  '-DG_LOG_DOMAIN="goa-daemon"',
+  '-DGOA_BACKEND_COMPILATION',
+  '-DGOA_API_IS_SUBJECT_TO_CHANGE',
+  '-DGOA_BACKEND_API_IS_SUBJECT_TO_CHANGE'
+]
+
+executable(
+  'goa-daemon',
+  sources,
+  include_directories: [top_inc, src_inc],
+  dependencies: libgoa_backend_dep,
+  c_args: cflags,
+  install: true,
+  install_dir: goa_libexecdir
+)
diff --git a/src/examples/meson.build b/src/examples/meson.build
new file mode 100644
index 0000000..38c9470
--- /dev/null
+++ b/src/examples/meson.build
@@ -0,0 +1,24 @@
+deps = glib_deps + [libgoa_dep]
+
+programs = [
+  # program name, extra deps
+  ['list-accounts', []],
+  ['lastfm-shout', [rest_dep]]
+]
+
+if enable_backend
+  programs += [
+    ['introspect-providers', [gtk_dep, libgoa_backend_dep]],
+    ['list-providers', [gtk_dep, libgoa_backend_dep]],
+    ['add-pocket', [rest_dep]]
+  ]
+endif
+
+foreach program: programs
+  executable(
+    program[0],
+    program[0] + '.c',
+    include_directories: [top_inc, src_inc],
+    dependencies: deps + program[1]
+  )
+endforeach
diff --git a/src/goa/goaconfig.h.in b/src/goa/goaconfig.h.in
new file mode 100644
index 0000000..65f800c
--- /dev/null
+++ b/src/goa/goaconfig.h.in
@@ -0,0 +1,17 @@
+/* goaconfig.h
+ *
+ * This is a generated file.  Please modify 'goaconfig.h.in'
+ */
+
+#ifndef __GOA_CONFIG_H__
+#define __GOA_CONFIG_H__
+
+G_BEGIN_DECLS
+
+#define GOA_MAJOR_VERSION @GOA_MAJOR_VERSION@
+#define GOA_MINOR_VERSION @GOA_MINOR_VERSION@
+#define GOA_MICRO_VERSION @GOA_MICRO_VERSION@
+
+G_END_DECLS
+
+#endif /* __GOA_CONFIG_H__ */
diff --git a/src/goa/meson.build b/src/goa/meson.build
new file mode 100644
index 0000000..65d6509
--- /dev/null
+++ b/src/goa/meson.build
@@ -0,0 +1,146 @@
+goa_inc = include_directories('.')
+
+enum_headers = files('goaenums.h')
+
+headers = enum_headers + files(
+  'goaclient.h',
+  'goaerror.h',
+  'goa.h',
+  'goaversion.h'
+)
+
+install_headers(
+  headers,
+  install_dir: join_paths(goa_pkgincludedir, 'goa')
+)
+
+config_conf = configuration_data()
+config_conf.set('GOA_MAJOR_VERSION', goa_major_version)
+config_conf.set('GOA_MINOR_VERSION', goa_minor_version)
+config_conf.set('GOA_MICRO_VERSION', goa_micro_version)
+
+config = 'goaconfig.h'
+
+config_header = configure_file(
+  input: config + '.in',
+  output: config,
+  install: true,
+  install_dir: join_paths(goa_pkglibdir, 'include'),
+  configuration: config_conf
+)
+
+sources = files(
+  'goaclient.c',
+  'goaerror.c',
+  'goaversion.c'
+)
+
+# FIXME: generate-docbook option is missing
+'''
+dbus_built_sources = goa-generated.c goa-generated.h goa-generated-doc-org.gnome.OnlineAccounts.Account.xml
+BUILT_SOURCES += $(dbus_built_sources)
+
+$(dbus_built_sources) : Makefile.am $(top_srcdir)/data/dbus-interfaces.xml
+  $(AM_V_GEN) gdbus-codegen                             \
+    --interface-prefix org.gnome.OnlineAccounts.                            \
+    --c-namespace Goa             \
+    --c-generate-object-manager           \
+    --generate-c-code goa-generated                                 \
+    --generate-docbook goa-generated-doc          \
+    $(top_srcdir)/data/dbus-interfaces.xml          \
+    $(NULL)
+'''
+
+dbus = 'goa-generated'
+
+sources += gnome.gdbus_codegen(
+  dbus,
+  dbus_interfaces,
+  interface_prefix: 'org.gnome.OnlineAccounts.',
+  namespace: 'Goa',
+  object_manager: true,
+  # FIXME: missing install parameters
+  #install: true,
+  #install_dir: join_paths(goa_pkgincludedir, 'goa')
+)
+
+enum = 'goaenumtypes'
+
+sources += gnome.mkenums(
+  enum,
+  sources: enum_headers,
+  c_template: enum + '.c.template',
+  h_template: enum + '.h.template',
+  install_header: true,
+  install_dir: join_paths(goa_pkgincludedir, 'goa')
+)
+
+cflags = [
+  '-DG_LOG_DOMAIN="Goa"',
+  '-DGOA_COMPILATION'
+]
+
+libgoa = shared_library(
+  goa_api_name,
+  sources: sources + [config_header],
+  version: goa_libversion,
+  include_directories: [top_inc, src_inc],
+  dependencies: glib_deps,
+  c_args: cflags,
+  install: true,
+  install_dir: goa_libdir
+)
+
+libgoa_dep = declare_dependency(
+  link_with: libgoa,
+  include_directories: include_directories('.'),
+  dependencies: glib_deps
+)
+
+pkg.generate(
+  libraries: libgoa,
+  version: goa_version,
+  name: 'Goa',
+  description: 'GNOME Online Accounts Library',
+  filebase: goa_api_name,
+  subdirs: goa_api_name,
+  requires: 'gio-2.0',
+  variables: 'exec_prefix=' + goa_libexecdir,
+  install_dir: join_paths(goa_libdir, 'pkgconfig')
+)
+
+if have_gir
+  gir_sources = sources + headers
+
+  gir_extra_args = [
+    '--c-include=goa/goa.h',
+    '--warn-all',
+    '-DGOA_COMPILATION'
+  ]
+
+  gir_dir = join_paths(goa_datadir, 'gir-' + goa_gir_version)
+  typelib_dir = join_paths(goa_libdir, 'girepository-' + goa_gir_version)
+
+  libgoa_gir = gnome.generate_gir(
+    libgoa,
+    sources: gir_sources,
+    nsversion: goa_api_version,
+    namespace: goa_gir_name,
+    includes: 'Gio-2.0',
+    extra_args: gir_extra_args,
+    install: true,
+    install_dir_gir: gir_dir,
+    install_dir_typelib: typelib_dir,
+  )
+
+  if enable_vala != 'no'
+    gnome.generate_vapi(
+      goa_api_name,
+      sources: libgoa_gir[0],
+      metadata_dirs: meson.current_source_dir(),
+      packages: 'gio-2.0',
+      install: true,
+      install_dir: join_paths(goa_datadir, 'vala', 'vapi')
+    )
+  endif
+endif
diff --git a/src/goabackend/meson.build b/src/goabackend/meson.build
new file mode 100644
index 0000000..daf0a25
--- /dev/null
+++ b/src/goabackend/meson.build
@@ -0,0 +1,187 @@
+enum_headers = files('goabackendenums.h')
+
+headers = enum_headers + files(
+  'goabackend.h',
+  'goaprovider.h'
+)
+
+install_headers(
+  headers,
+  install_dir: join_paths(goa_pkgincludedir, 'goabackend')
+)
+
+sources = identity_manager_error_src + files(
+  'goabackendinit.c',
+  'goadlnaservermanager.c',
+  'goaewsclient.c',
+  'goaexchangeprovider.c',
+  'goafacebookprovider.c',
+  'goaflickrprovider.c',
+  'goafoursquareprovider.c',
+  'goagoogleprovider.c',
+  'goahttpclient.c',
+  'goaimapauthlogin.c',
+  'goaimapsmtpprovider.c',
+  'goalastfmprovider.c',
+  'goamailauth.c',
+  'goamailclient.c',
+  'goamediaserverprovider.c',
+  'goaoauth2provider.c',
+  'goaoauthprovider.c',
+  'goaobjectskeletonutils.c',
+  'goaowncloudprovider.c',
+  'goapocketprovider.c',
+  'goaprovider.c',
+  'goaproviderfactory.c',
+  'goarestproxy.c',
+  'goasmtpauth.c',
+  'goasouplogger.c',
+  'goatodoistprovider.c',
+  'goautils.c',
+  'goawebview.c',
+  'goawindowsliveprovider.c',
+  'nautilus-floating-bar.c'
+)
+
+enum = 'goabackendenumtypes'
+
+sources += gnome.mkenums(
+  enum,
+  sources: enum_headers,
+  c_template: enum + '.c.template',
+  h_template: enum + '.h.template',
+  install_header: true,
+  install_dir: join_paths(goa_pkgincludedir, 'goabackend')
+)
+
+dbus = 'goadleynaservermanager'
+
+sources += gnome.gdbus_codegen(
+  dbus,
+  dbus + '.xml',
+  interface_prefix: 'com.intel.dLeynaServer.',
+  namespace: 'DleynaServer'
+)
+
+dbus = 'goadleynaservermediadevice'
+
+sources += gnome.gdbus_codegen(
+  dbus,
+  dbus + '.xml',
+  interface_prefix: 'com.intel.dLeynaServer.',
+  namespace: 'DleynaServer'
+)
+
+incs = [
+  top_inc,
+  src_inc
+]
+
+deps = [
+  json_glib_dep,
+  libgoa_dep,
+  libsecret_dep,
+  libsoup_dep,
+  libxml_dep,
+  rest_dep,
+  webkit_gtk_dep
+]
+
+cflags = [
+  '-DG_LOG_DOMAIN="GoaBackend"',
+  '-DGOA_BACKEND_COMPILATION',
+  '-DGOA_API_IS_SUBJECT_TO_CHANGE',
+  '-DPACKAGE_WEB_EXTENSIONS_DIR="@0@"'.format(join_paths(goa_pkglibdir, 'web-extensions'))
+]
+
+if have_kerberos
+  sources += files('goakerberosprovider.c')
+
+  incs += goaidentity_inc
+
+  deps += [gcr_dep]
+endif
+
+if enable_telepathy
+  sources += files(
+    'goatelepathyfactory.c',
+    'goatelepathyprovider.c',
+    'goatpaccountlinker.c'
+  )
+
+  deps += [
+    telepathy_glib_dep,
+    #telepathy_accounts_widgets_dep
+  ]
+endif
+
+libgoa_backend = shared_library(
+  goa_backend_api_name,
+  sources + [
+    config_header,
+    identity_dbus,
+    realmd_dbus
+  ],
+  version: goa_backend_libversion,
+  include_directories: incs,
+  dependencies: deps,
+  c_args: cflags,
+  install: true,
+  install_dir: goa_libdir
+)
+
+libgoa_backend_dep = declare_dependency(
+  link_with: libgoa_backend,
+  include_directories: include_directories('.'),
+  dependencies: deps
+)
+
+pkg.generate(
+  libraries: libgoa_backend,
+  version: goa_version,
+  name: 'Goa Backends',
+  description: 'Backends for GNOME Online Accounts Library',
+  filebase: goa_backend_api_name,
+  subdirs: goa_api_name,
+  requires: [
+    goa_api_name,
+    'gtk+-3.0'
+  ],
+  variables: 'exec_prefix=' + goa_libexecdir,
+  install_dir: join_paths(goa_libdir, 'pkgconfig')
+)
+
+sources = files(
+  'goawebextension.c',
+  'goawebextensionmain.c'
+)
+
+incs = [
+  top_inc,
+  src_inc,
+  goa_inc
+]
+
+deps = [
+  libgoa_backend_dep,
+  rest_dep,
+  webkit_gtk_dep
+]
+
+test_ldflag = '-Wl,--no-undefined'
+ldflags = []
+
+if host_machine.system().contains('linux') and cc.has_argument(test_ldflag)
+  ldflags += test_ldflag
+endif
+
+libgoa_web_extension = shared_module(
+  'goawebextension',
+  sources + [config_header],
+  include_directories: incs,
+  dependencies: deps,
+  c_args: cflags,
+  link_args: ldflags,
+  install: true,
+  install_dir: join_paths(goa_pkglibdir, 'web-extensions')
+)
diff --git a/src/goaidentity/meson.build b/src/goaidentity/meson.build
new file mode 100644
index 0000000..8978ef9
--- /dev/null
+++ b/src/goaidentity/meson.build
@@ -0,0 +1,90 @@
+goaidentity_inc = include_directories('.')
+
+headers = files(
+  'goaalarm.h',
+  'goaidentity.h',
+  'goaidentityinquiry.h',
+  'goaidentityinquiryprivate.h',
+  'goaidentityservice.h',
+  'goaidentitymanagerprivate.h',
+  'goaidentitymanager.h',
+  'goaidentitymanagererror.h',
+  'goaidentityutils.h',
+  'goakerberosidentity.h',
+  'goakerberosidentityinquiry.h',
+  'goakerberosidentitymanager.h'
+)
+
+dbus = 'org.gnome.Identity'
+
+identity_dbus = gnome.gdbus_codegen(
+  dbus,
+  dbus + '.xml',
+  interface_prefix: dbus + '.',
+  namespace: 'GoaIdentityService',
+  object_manager: true,
+  annotations: [dbus, 'org.gtk.GDBus.C.Name', 'Identity']
+)
+
+dbus = 'org.freedesktop.realmd'
+
+realmd_dbus = gnome.gdbus_codegen(
+  dbus,
+  dbus + '.xml',
+  interface_prefix: dbus + '.',
+  namespace: 'GoaRealm',
+  object_manager: true,
+  annotations: [dbus + '.Realm', 'org.gtk.GDBus.C.Name', 'Common']
+)
+
+identity_manager_error_src = files('goaidentitymanagererror.c')
+
+sources = identity_manager_error_src + files(
+  'goaalarm.c',
+  'goaidentity.c',
+  'goaidentityinquiry.c',
+  'goaidentityservice.c',
+  'goaidentitymanager.c',
+  'goaidentityutils.c',
+  'goakerberosidentity.c',
+  'goakerberosidentityinquiry.c',
+  'goakerberosidentitymanager.c',
+  'main.c'
+)
+
+enum = 'goaidentityenumtypes'
+
+sources += gnome.mkenums(
+  enum,
+  sources: headers,
+  c_template: enum + '.c.in',
+  h_template: enum + '.h.in'
+)
+
+deps = glib_deps + [
+  gcr_dep,
+  gtk_dep,
+  krb5_dep,
+  libgoa_dep
+]
+
+cflags = [
+  '-DG_LOG_DOMAIN="libgoaidentity"',
+  '-DGOA_COMPILATION',
+  '-DGOA_API_IS_SUBJECT_TO_CHANGE',
+  '-DGOA_BACKEND_API_IS_SUBJECT_TO_CHANGE'
+]
+
+executable(
+  'goa-identity-service',
+  sources + [
+    config_header,
+    identity_dbus,
+    realmd_dbus
+  ],
+  include_directories: [top_inc, src_inc],
+  dependencies: deps,
+  c_args: cflags,
+  install: true,
+  install_dir: goa_libexecdir
+)
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..d571765
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,13 @@
+src_inc = include_directories('.')
+
+subdir('goa')
+
+if enable_backend
+  if have_kerberos
+    subdir('goaidentity')
+  endif
+
+  subdir('goabackend')
+  subdir('daemon')
+  subdir('examples')
+endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]