[gnome-software] Port to the meson build system
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Port to the meson build system
- Date: Tue, 6 Dec 2016 17:30:27 +0000 (UTC)
commit 49fafd9998853963b3c97fe797a1fe452d514a67
Author: Richard Hughes <richard hughsie com>
Date: Tue Dec 6 17:20:14 2016 +0000
Port to the meson build system
Automake and autoconf are impossible to fully understand and Meson now provides
everything we need for a much smaller, faster, and more understandable build.
See http://mesonbuild.com/ for more information.
data/appdata/meson.build | 8 +
data/icons/hicolor/meson.build | 16 ++
data/icons/meson.build | 1 +
data/meson.build | 40 +++
doc/api/meson.build | 10 +
doc/meson.build | 1 +
meson.build | 217 ++++++++++++++++
meson_options.txt | 19 ++
meson_post_install.sh | 14 +
po/meson.build | 6 +
src/meson.build | 344 ++++++++++++++++++++++++
src/plugins/meson.build | 559 ++++++++++++++++++++++++++++++++++++++++
12 files changed, 1235 insertions(+), 0 deletions(-)
---
diff --git a/data/appdata/meson.build b/data/appdata/meson.build
new file mode 100644
index 0000000..0eecab8
--- /dev/null
+++ b/data/appdata/meson.build
@@ -0,0 +1,8 @@
+i18n.merge_file(
+ input: 'org.gnome.Software.appdata.xml.in',
+ output: 'org.gnome.Software.appdata.xml',
+ type: 'xml',
+ po_dir: join_paths(meson.source_root(), 'po'),
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'appdata')
+)
diff --git a/data/icons/hicolor/meson.build b/data/icons/hicolor/meson.build
new file mode 100644
index 0000000..6c95595
--- /dev/null
+++ b/data/icons/hicolor/meson.build
@@ -0,0 +1,16 @@
+install_data('16x16/org.gnome.Software.png',
+ install_dir : 'share/icons/hicolor/16x16/apps')
+install_data('22x22/org.gnome.Software.png',
+ install_dir : 'share/icons/hicolor/22x22/apps')
+install_data('24x24/org.gnome.Software.png',
+ install_dir : 'share/icons/hicolor/24x24/apps')
+install_data('32x32/org.gnome.Software.png',
+ install_dir : 'share/icons/hicolor/32x32/apps')
+install_data('48x48/org.gnome.Software.png',
+ install_dir : 'share/icons/hicolor/48x48/apps')
+install_data('256x256/org.gnome.Software.png',
+ install_dir : 'share/icons/hicolor/256x256/apps')
+install_data('scalable/org.gnome.Software-symbolic.svg',
+ install_dir : 'share/icons/hicolor/scalable/apps')
+install_data('scalable/software-installed-symbolic.svg',
+ install_dir : 'share/icons/hicolor/scalable/apps')
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000..13ca713
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1 @@
+subdir('hicolor')
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..67977fa
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,40 @@
+subdir('appdata')
+subdir('icons')
+
+compiled = gnome.compile_schemas()
+install_data('org.gnome.software.gschema.xml',
+ install_dir : 'share/glib-2.0/schemas')
+
+if get_option('enable-external-appstream')
+ # replace @libexecdir@
+ configure_file(
+ input : 'org.gnome.software.external-appstream.policy.in',
+ output : 'org.gnome.software.external-appstream.policy',
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions'),
+ configuration : conf
+ )
+endif
+
+install_data([
+ 'upgrade-bg.png',
+ 'featured-ardour.png',
+ 'featured-ardour-bg.png',
+ 'featured-blender.png',
+ 'featured-builder.png',
+ 'featured-builder-bg.jpg',
+ 'featured-chess.png',
+ 'featured-firefox.png',
+ 'featured-gimp.png',
+ 'featured-gnome-sudoku.png',
+ 'featured-inkscape.svg',
+ 'featured-maps.png',
+ 'featured-maps-bg.png',
+ 'featured-mypaint.png',
+ 'featured-polari.svg',
+ 'featured-transmission.png',
+ 'featured-weather.png',
+ 'featured-weather-bg.png'
+ ],
+ install_dir : 'share/gnome-software'
+)
diff --git a/doc/api/meson.build b/doc/api/meson.build
new file mode 100644
index 0000000..294f4d4
--- /dev/null
+++ b/doc/api/meson.build
@@ -0,0 +1,10 @@
+gnome.gtkdoc('gnome-software',
+ src_dir : join_paths(meson.source_root(), 'src'),
+ main_xml : 'gnome-software-docs.xml',
+ content_files : [
+ 'gs-example-details.png',
+ 'gs-example-installed.png',
+ 'gs-example-search.png'
+ ],
+ install : true
+)
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..dc2bb41
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1 @@
+subdir('api')
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..d664976
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,217 @@
+project('gnome-software', 'c',
+ version : '3.23.3',
+ default_options : ['warning_level=1'],
+ meson_version : '>=0.37.0'
+)
+
+conf = configuration_data()
+conf.set('VERSION', '"@0@"'.format(meson.project_version()))
+conf.set('PACKAGE_NAME', '"@0@"'.format(meson.project_name()))
+conf.set('PACKAGE_VERSION', '"@0@"'.format(meson.project_version()))
+
+# this refers to the gnome-software plugin API version
+# this is not in any way related to a package or soname version
+conf.set('GS_PLUGIN_API_VERSION', '"@0@"'.format('11'))
+
+# install docs
+install_data('README', install_dir : 'share/doc/gnome-software')
+
+# get suported warning flags
+test_args = [
+ '-fstack-protector-strong',
+ '-Waggregate-return',
+ '-Warray-bounds',
+ '-Wcast-align',
+ '-Wclobbered',
+ '-Wdeclaration-after-statement',
+ '-Wempty-body',
+ '-Wextra',
+ '-Wformat=2',
+ '-Wformat-nonliteral',
+ '-Wformat-security',
+ '-Wformat-signedness',
+ '-Wignored-qualifiers',
+ '-Wimplicit-function-declaration',
+ '-Winit-self',
+ '-Winline',
+ '-Wmissing-declarations',
+ '-Wmissing-format-attribute',
+ '-Wmissing-include-dirs',
+ '-Wmissing-noreturn',
+ '-Wmissing-parameter-type',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wno-discarded-qualifiers',
+ '-Wno-missing-field-initializers',
+ '-Wno-strict-aliasing',
+ '-Wno-suggest-attribute=format',
+ '-Wno-unused-parameter',
+ '-Wold-style-definition',
+ '-Woverride-init',
+ '-Wpacked',
+ '-Wpointer-arith',
+ '-Wredundant-decls',
+ '-Wreturn-type',
+ '-Wshadow',
+ '-Wsign-compare',
+ '-Wstrict-aliasing',
+ '-Wstrict-prototypes',
+ '-Wswitch-default',
+ '-Wtype-limits',
+ '-Wundef',
+ '-Wuninitialized',
+ '-Wunused-but-set-variable',
+ '-Wwrite-strings'
+]
+cc = meson.get_compiler('c')
+foreach arg: test_args
+ if cc.has_argument(arg)
+ add_project_arguments(arg, language : 'c')
+ endif
+endforeach
+
+# enable full RELRO where possible
+# FIXME: until https://github.com/mesonbuild/meson/issues/1140 is fixed
+global_link_args = []
+test_link_args = [
+ '-Wl,-z,relro',
+ '-Wl,-z,now',
+]
+foreach arg: test_link_args
+ if cc.has_argument(arg)
+ global_link_args += arg
+ endif
+endforeach
+add_global_link_arguments(
+ global_link_args,
+ language: 'c'
+)
+
+appstream_glib = dependency('appstream-glib', version : '>= 0.6.5')
+gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.31.5')
+gio_unix = dependency('gio-unix-2.0')
+gmodule = dependency('gmodule-2.0')
+gtk = dependency('gtk+-3.0', version : '>= 3.20.0')
+json_glib = dependency('json-glib-1.0', version : '>= 1.1.1')
+libm = cc.find_library('libm', required: false)
+libsecret = dependency('libsecret-1')
+libsoup = dependency('libsoup-2.4', version : '>= 2.51.92')
+sqlite3 = dependency('sqlite3')
+
+if get_option('enable-gnome-desktop')
+ gnome_desktop = dependency('gnome-desktop-3.0', version : '>= 3.17.92')
+endif
+
+if get_option('enable-gtkspell')
+ gtkspell = dependency('gtkspell3-3.0')
+endif
+
+if get_option('enable-polkit')
+ polkit = dependency('polkit-gobject-1')
+endif
+
+if get_option('enable-ostree')
+ ostree = dependency('ostree-1')
+endif
+
+if get_option('enable-packagekit')
+ packagekit = dependency('packagekit-glib2', version : '>= 1.1.0')
+ conf.set('HAVE_PACKAGEKIT', '1')
+ add_project_arguments('-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE',
+ language : 'c')
+endif
+
+if get_option('enable-firmware')
+ fwupd = dependency('fwupd', version : '>= 0.7.0')
+endif
+
+if get_option('enable-flatpak')
+ flatpak = dependency('flatpak', version : '>= 0.6.12')
+endif
+
+if get_option('enable-limba')
+ limba = dependency('limba', version : '>= 0.5.6')
+endif
+
+if get_option('enable-rpm')
+ rpm = dependency('rpm')
+endif
+
+if get_option('enable-ubuntu-reviews')
+ oauth = dependency('oauth')
+endif
+
+if get_option('enable-gudev')
+ gudev = dependency('gudev-1.0')
+endif
+
+if get_option('enable-snap')
+ snap = dependency('snapd-glib')
+endif
+
+gnome = import('gnome')
+i18n = import('i18n')
+
+conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
+conf.set_quoted('TESTDATADIR', '..')
+conf.set_quoted('LOCALEDIR',
+ join_paths(get_option('prefix'),
+ get_option('localedir')))
+conf.set_quoted('DATADIR',
+ join_paths(get_option('prefix'),
+ get_option('datadir')))
+conf.set_quoted('LIBDIR',
+ join_paths(get_option('prefix'),
+ get_option('libdir')))
+conf.set_quoted('SYSCONFDIR',
+ join_paths(get_option('prefix'),
+ get_option('sysconfdir')))
+# FIXME: xxx
+conf.set_quoted('LOCALSTATEDIR', '/var')
+conf.set_quoted('GS_DATA',
+ join_paths(get_option('prefix'),
+ get_option('datadir'),
+ 'gnome-software'))
+configure_file(
+ output : 'config.h',
+ configuration : conf
+)
+top_build_incdir = include_directories(meson.current_build_dir())
+
+add_project_arguments('-DI_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE',
+ language : 'c')
+
+subdir('src')
+subdir('po')
+subdir('data')
+subdir('doc')
+
+archiver = find_program('git', required : false)
+if archiver.found()
+ run_target('dist',
+ # git config tar.tar.xz.command "xz -c"
+ command: [
+ 'git', 'archive',
+ '--prefix=' + meson.project_name() + '-' + meson.project_version() + '/',
+ 'HEAD',
+ '--format=tar.xz',
+ '--output',
+ meson.project_name() + '-' + meson.project_version() + '.tar.xz'
+ ]
+ )
+else
+ message('git not found, you will not be able to run `ninja dist`')
+endif
+
+appstream_util = find_program('appstream-util', required : false)
+if appstream_util.found()
+ custom_target('NEWS',
+ output : 'NEWS',
+ input : 'data/appdata/org.gnome.Software.appdata.xml.in',
+ command : [appstream_util, 'appdata-to-news', '@INPUT@'],
+ capture : true
+ )
+endif
+
+# FIXME: remove when https://github.com/mesonbuild/meson/issues/837 fixed
+meson.add_install_script('meson_post_install.sh')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..9fb3cc9
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,19 @@
+option('enable-tests', type : 'boolean', value : true, description : 'enable tests')
+option('enable-gtkspell', type : 'boolean', value : true, description : 'enable gtkspell')
+option('enable-gnome-desktop', type : 'boolean', value : true, description : 'enable gnome-desktop')
+option('enable-man', type : 'boolean', value : true, description : 'enable man pages')
+option('enable-packagekit', type : 'boolean', value : true, description : 'enable PackageKit support')
+option('enable-polkit', type : 'boolean', value : true, description : 'enable PolKit support')
+option('enable-firmware', type : 'boolean', value : true, description : 'enable firmware support')
+option('enable-flatpak', type : 'boolean', value : true, description : 'enable Flatpak support')
+option('enable-ostree', type : 'boolean', value : true, description : 'enable OSTree support')
+option('enable-limba', type : 'boolean', value : false, description : 'enable Limba support')
+option('enable-rpm', type : 'boolean', value : true, description : 'enable RPM support')
+option('enable-steam', type : 'boolean', value : true, description : 'enable Steam support')
+option('enable-shell-extensions', type : 'boolean', value : true, description : 'enable shell extensions
support')
+option('enable-odrs', type : 'boolean', value : true, description : 'enable ODRS support')
+option('enable-ubuntu-reviews', type : 'boolean', value : true, description : 'enable Ubuntu reviews
support')
+option('enable-webapps', type : 'boolean', value : true, description : 'enable webapps support')
+option('enable-gudev', type : 'boolean', value : true, description : 'enable GUdev support')
+option('enable-snap', type : 'boolean', value : false, description : 'enable Snap support')
+option('enable-external-appstream', type : 'boolean', value : false, description : 'enable external
AppStream support')
diff --git a/meson_post_install.sh b/meson_post_install.sh
new file mode 100644
index 0000000..c523b15
--- /dev/null
+++ b/meson_post_install.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+if [ -z $MESON_INSTALL_PREFIX ]; then
+ echo 'This is meant to be ran from Meson only!'
+ exit 1
+fi
+
+if [ -z $DESTDIR ]; then
+ echo 'Compiling GSchema'
+ glib-compile-schemas "$MESON_INSTALL_PREFIX/share/glib-2.0/schemas"
+ echo 'Updating icon cache'
+ gtk-update-icon-cache -qtf "$MESON_INSTALL_PREFIX/share/icons/hicolor"
+ echo 'Updating desktop database'
+ update-desktop-database -q "$MESON_INSTALL_PREFIX/share/applications"
+fi
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..6b9a7bc
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,6 @@
+i18n.gettext(meson.project_name(),
+ preset : 'glib',
+ args: [
+ '--default-domain=' + meson.project_name(),
+ ]
+)
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..af6d6b3
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,344 @@
+subdir('plugins')
+
+cargs = ['-DG_LOG_DOMAIN="Gpm"']
+
+resources_src = gnome.compile_resources(
+ 'gs-resources',
+ 'gnome-software.gresource.xml',
+ source_dir : '.',
+ c_name : 'gs'
+)
+
+gdbus_src = gnome.gdbus_codegen(
+ 'gs-shell-search-provider-generated',
+ 'shell-search-provider-dbus-interfaces.xml',
+ interface_prefix : 'org.gnome.',
+ namespace : 'Gs'
+)
+
+gnome_software_sources = [
+ 'gnome-software.h',
+ 'gs-utils.c',
+ 'gs-utils.h',
+ 'gs-app.c',
+ 'gs-app.h',
+ 'gs-app-private.h',
+ 'gs-app-list.c',
+ 'gs-app-list.h',
+ 'gs-app-list-private.h',
+ 'gs-auth.c',
+ 'gs-auth.h',
+ 'gs-auth-dialog.c',
+ 'gs-auth-dialog.h',
+ 'gs-category.c',
+ 'gs-category.h',
+ 'gs-category-private.h',
+ 'gs-common.c',
+ 'gs-common.h',
+ 'gs-content-rating.c',
+ 'gs-content-rating.h',
+ 'gs-debug.c',
+ 'gs-debug.h',
+ 'gs-app-addon-row.c',
+ 'gs-app-addon-row.h',
+ 'gs-app-row.c',
+ 'gs-app-row.h',
+ 'gs-star-widget.c',
+ 'gs-star-widget.h',
+ 'gs-popular-tile.c',
+ 'gs-popular-tile.h',
+ 'gs-feature-tile.c',
+ 'gs-feature-tile.h',
+ 'gs-category-tile.c',
+ 'gs-category-tile.h',
+ 'gs-app-tile.c',
+ 'gs-app-tile.h',
+ 'gs-summary-tile.c',
+ 'gs-summary-tile.h',
+ 'gs-app-folder-dialog.c',
+ 'gs-app-folder-dialog.h',
+ 'gs-first-run-dialog.c',
+ 'gs-first-run-dialog.h',
+ 'gs-history-dialog.c',
+ 'gs-history-dialog.h',
+ 'gs-fixed-size-bin.h',
+ 'gs-fixed-size-bin.c',
+ 'gs-hiding-box.h',
+ 'gs-hiding-box.c',
+ 'gs-info-bar.h',
+ 'gs-info-bar.c',
+ 'gs-language.c',
+ 'gs-language.h',
+ 'gs-os-release.c',
+ 'gs-os-release.h',
+ 'gs-page.c',
+ 'gs-page.h',
+ 'gs-plugin.c',
+ 'gs-plugin.h',
+ 'gs-plugin-event.c',
+ 'gs-plugin-event.h',
+ 'gs-plugin-private.h',
+ 'gs-plugin-types.h',
+ 'gs-plugin-vfuncs.h',
+ 'gs-progress-button.c',
+ 'gs-progress-button.h',
+ 'gs-removal-dialog.c',
+ 'gs-removal-dialog.h',
+ 'gs-review-bar.c',
+ 'gs-review-bar.h',
+ 'gs-review-dialog.c',
+ 'gs-review-dialog.h',
+ 'gs-review-histogram.c',
+ 'gs-review-histogram.h',
+ 'gs-review-row.c',
+ 'gs-review-row.h',
+ 'gs-screenshot-image.c',
+ 'gs-screenshot-image.h',
+ 'gs-shell.c',
+ 'gs-shell.h',
+ 'gs-shell-details.c',
+ 'gs-shell-details.h',
+ 'gs-shell-category.c',
+ 'gs-shell-category.h',
+ 'gs-shell-extras.c',
+ 'gs-shell-extras.h',
+ 'gs-shell-installed.c',
+ 'gs-shell-installed.h',
+ 'gs-shell-moderate.c',
+ 'gs-shell-moderate.h',
+ 'gs-shell-loading.c',
+ 'gs-shell-loading.h',
+ 'gs-shell-overview.c',
+ 'gs-shell-overview.h',
+ 'gs-shell-updates.c',
+ 'gs-shell-updates.h',
+ 'gs-shell-search.c',
+ 'gs-shell-search.h',
+ 'gs-sources-dialog.c',
+ 'gs-sources-dialog.h',
+ 'gs-sources-dialog-row.c',
+ 'gs-sources-dialog-row.h',
+ 'gs-update-dialog.c',
+ 'gs-update-dialog.h',
+ 'gs-update-list.c',
+ 'gs-update-list.h',
+ 'gs-update-monitor.c',
+ 'gs-update-monitor.h',
+ 'gs-upgrade-banner.c',
+ 'gs-upgrade-banner.h',
+ 'gs-vendor.c',
+ 'gs-vendor.h',
+ 'gs-plugin-loader.c',
+ 'gs-plugin-loader.h',
+ 'gs-plugin-loader-sync.c',
+ 'gs-plugin-loader-sync.h',
+ 'gs-shell-search-provider.c',
+ 'gs-shell-search-provider.h',
+ 'gs-application.c',
+ 'gs-application.h',
+ 'gs-folders.c',
+ 'gs-folders.h',
+ 'gs-main.c'
+]
+
+gnome_software_dependencies = [gtk, gio_unix, libm, appstream_glib, json_glib, libsoup, libsecret, gmodule]
+
+if get_option('enable-packagekit')
+ gnome_software_sources += [
+ 'gs-dbus-helper.c',
+ 'gs-dbus-helper.h',
+ ]
+ gnome_software_sources += gnome.gdbus_codegen(
+ 'gs-packagekit-generated',
+ 'org.freedesktop.PackageKit.xml',
+ interface_prefix : 'org.freedesktop.',
+ namespace : 'Gs'
+ )
+ gnome_software_sources += gnome.gdbus_codegen(
+ 'gs-packagekit-modify2-generated',
+ 'org.freedesktop.PackageKit.Modify2.xml',
+ interface_prefix : 'org.freedesktop.',
+ namespace : 'Gs'
+ )
+ gnome_software_dependencies += [packagekit]
+endif
+
+executable(
+ 'gnome-software',
+ resources_src,
+ gdbus_src,
+ sources : gnome_software_sources,
+ include_directories : [
+ include_directories('..'),
+ ],
+ dependencies : gnome_software_dependencies,
+ c_args : cargs,
+ install : true,
+ install_dir : 'bin'
+)
+
+executable(
+ 'gnome-software-cmd',
+ sources : [
+ 'gs-app.c',
+ 'gs-app-list.c',
+ 'gs-auth.c',
+ 'gs-cmd.c',
+ 'gs-common.c',
+ 'gs-debug.c',
+ 'gs-utils.c',
+ 'gs-os-release.c',
+ 'gs-plugin-event.c',
+ 'gs-plugin-loader.c',
+ 'gs-plugin-loader-sync.c',
+ 'gs-category.c',
+ 'gs-plugin.c'
+ ],
+ include_directories : [
+ include_directories('..'),
+ ],
+ dependencies : [
+ appstream_glib,
+ gio_unix,
+ gmodule,
+ gtk,
+ json_glib,
+ libm,
+ libsecret,
+ libsoup
+ ],
+ c_args : cargs,
+ install : true,
+ install_dir : 'libexec'
+)
+
+if get_option('enable-tests')
+ e = executable(
+ 'gs-self-test',
+ sources : [
+ 'gs-app.c',
+ 'gs-app-list.c',
+ 'gs-auth.c',
+ 'gs-category.c',
+ 'gs-common.c',
+ 'gs-os-release.c',
+ 'gs-plugin-event.c',
+ 'gs-plugin-loader-sync.c',
+ 'gs-plugin-loader.c',
+ 'gs-plugin.c',
+ 'gs-utils.c',
+ 'gs-self-test.c'
+ ],
+ include_directories : [
+ include_directories('..'),
+ ],
+ dependencies : [
+ appstream_glib,
+ gio_unix,
+ gmodule,
+ gtk,
+ json_glib,
+ libm,
+ libsecret,
+ libsoup
+ ],
+ c_args : cargs
+ )
+ test('gs-self-test', e)
+endif
+
+install_headers([
+ 'gnome-software.h',
+ 'gs-app.h',
+ 'gs-app-list.h',
+ 'gs-auth.h',
+ 'gs-category.h',
+ 'gs-os-release.h',
+ 'gs-plugin.h',
+ 'gs-plugin-event.h',
+ 'gs-plugin-types.h',
+ 'gs-plugin-vfuncs.h',
+ 'gs-utils.h'
+ ],
+ subdir : 'gnome-software'
+)
+
+# replace @VERSION@
+configure_file(
+ input : 'org.gnome.Software.service.in',
+ output : 'org.gnome.Software.service',
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'dbus-1/services'),
+ configuration : conf
+)
+
+# replace @bindir@
+configure_file(
+ input : 'gnome-software-service.desktop.in',
+ output : 'gnome-software-service.desktop',
+ install: true,
+ install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart'),
+ configuration : conf
+)
+
+i18n.merge_file(
+ input: 'org.gnome.Software.desktop.in',
+ output: 'org.gnome.Software.desktop',
+ type: 'desktop',
+ po_dir: join_paths(meson.source_root(), 'po'),
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'applications')
+)
+
+i18n.merge_file(
+ input: 'gnome-software-local-file.desktop.in',
+ output: 'gnome-software-local-file.desktop',
+ type: 'desktop',
+ po_dir: join_paths(meson.source_root(), 'po'),
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'applications')
+)
+
+install_data('org.gnome.Software-search-provider.ini',
+ install_dir : 'share/gnome-shell/search-providers')
+
+if get_option('enable-man')
+ xsltproc = find_program('xsltproc')
+ custom_target('manfile',
+ input: 'gnome-software.xml',
+ output: 'gnome-software.1',
+ install: true,
+ install_dir: join_paths(get_option('mandir'), 'man1'),
+ command: [
+ xsltproc,
+ '--nonet',
+ '--stringparam', 'man.output.quietly', '1',
+ '--stringparam', 'funcsynopsis.style', 'ansi',
+ '--stringparam', 'man.th.extra1.suppress', '1',
+ '--stringparam', 'man.authors.section.enabled', '0',
+ '--stringparam', 'man.copyright.section.enabled', '0',
+ '-o', '@OUTPUT@',
+ 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+ '@INPUT@'
+ ]
+ )
+endif
+
+if get_option('enable-packagekit')
+ # replace @bindir@
+ configure_file(
+ input : 'org.freedesktop.PackageKit.service.in',
+ output : 'org.freedesktop.PackageKit.service',
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'dbus-1', 'services'),
+ configuration : conf
+ )
+endif
+
+configure_file(
+ input : 'gnome-software.pc.in',
+ output : 'gnome-software.pc',
+ install: true,
+ install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
+ configuration : conf
+)
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
new file mode 100644
index 0000000..524d5fc
--- /dev/null
+++ b/src/plugins/meson.build
@@ -0,0 +1,559 @@
+plugin_dir = join_paths(get_option('libdir'), 'gs-plugins-11')
+
+plugin_libs = [
+ appstream_glib,
+ gtk,
+ json_glib,
+ libsoup
+]
+metainfos = []
+
+shared_module('gs_plugin_dummy',
+ sources : 'gs-plugin-dummy.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [appstream_glib, gtk, libsoup]
+)
+
+shared_module('gs_plugin_dpkg',
+ sources : 'gs-plugin-dpkg.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+if get_option('enable-external-appstream')
+ executable(
+ 'gnome-software-install-appstream',
+ sources : 'gs-install-appstream.c',
+ include_directories : [
+ include_directories('@0@/..'.format(meson.current_build_dir())),
+ ],
+ dependencies : [appstream_glib],
+ c_args : cargs,
+ install : true,
+ install_dir : 'libexec'
+ )
+ shared_module('gs_plugin_external-appstream',
+ sources : 'gs-plugin-external-appstream.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [gio_unix, appstream_glib, libsoup]
+ )
+endif
+
+shared_module('gs_plugin_key-colors',
+ sources : 'gs-plugin-key-colors.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+if get_option('enable-shell-extensions')
+ shared_module('gs_plugin_shell-extensions',
+ sources : 'gs-plugin-shell-extensions.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+ )
+endif
+
+shared_module('gs_plugin_fedora-distro-upgrades',
+ sources : 'gs-plugin-fedora-distro-upgrades.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+if get_option('enable-gudev')
+ shared_module('gs_plugin_modalias',
+ sources : 'gs-plugin-modalias.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, gudev ]
+ )
+endif
+
+shared_module('gs_plugin_provenance',
+ sources : 'gs-plugin-provenance.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+shared_module('gs_plugin_provenance-license',
+ sources : 'gs-plugin-provenance-license.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+shared_module('gs_plugin_fedora-tagger-usage',
+ sources : 'gs-plugin-fedora-tagger-usage.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+shared_module('gs_plugin_epiphany',
+ sources : 'gs-plugin-epiphany.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+metainfos += 'org.gnome.Software.Plugin.Epiphany.metainfo.xml'
+
+shared_module('gs_plugin_icons',
+ sources : 'gs-plugin-icons.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+shared_module('gs_plugin_appstream',
+ sources : [
+ 'gs-appstream.c',
+ 'gs-appstream.h',
+ 'gs-plugin-appstream.c'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+if get_option('enable-limba')
+shared_module('gs_plugin_limba',
+ sources : 'gs-plugin-limba.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+ )
+endif
+
+if get_option('enable-flatpak')
+ shared_module('gs_plugin_flatpak',
+ sources : [
+ 'gs-appstream.c',
+ 'gs-appstream.h',
+ 'gs-flatpak.c',
+ 'gs-flatpak.h',
+ 'gs-flatpak-symlinks.c',
+ 'gs-flatpak-symlinks.h',
+ 'gs-plugin-flatpak.c'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, flatpak ]
+ )
+ metainfos += 'org.gnome.Software.Plugin.Flatpak.metainfo.xml'
+endif
+
+if get_option('enable-ostree')
+ shared_module('gs_plugin_ostree',
+ sources : 'gs-plugin-ostree.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, ostree ]
+ )
+endif
+
+if get_option('enable-odrs')
+ shared_module('gs_plugin_odrs',
+ sources : 'gs-plugin-odrs.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+ )
+ metainfos += 'org.gnome.Software.Plugin.Odrs.metainfo.xml'
+endif
+
+if get_option('enable-rpm')
+ shared_module('gs_plugin_rpm',
+ sources : 'gs-plugin-rpm.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, rpm ]
+ )
+endif
+
+if get_option('enable-steam')
+ shared_module('gs_plugin_steam',
+ sources : 'gs-plugin-steam.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+ )
+ metainfos += 'org.gnome.Software.Plugin.Steam.metainfo.xml'
+endif
+
+shared_module('gs_plugin_repos',
+ sources : 'gs-plugin-repos.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+shared_module('gs_plugin_desktop-categories',
+ sources : [
+ 'gs-plugin-desktop-categories.c',
+ 'gs-desktop-common.c',
+ 'gs-desktop-common.h'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+shared_module('gs_plugin_desktop-menu-path',
+ sources : [
+ 'gs-plugin-desktop-menu-path.c',
+ 'gs-desktop-common.c',
+ 'gs-desktop-common.h'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+shared_module('gs_plugin_hardcoded-blacklist',
+ sources : 'gs-plugin-hardcoded-blacklist.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+shared_module('gs_plugin_hardcoded-popular',
+ sources : 'gs-plugin-hardcoded-popular.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+shared_module('gs_plugin_hardcoded-featured',
+ sources : 'gs-plugin-hardcoded-featured.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+if get_option('enable-ubuntu-reviews')
+ shared_module('gs_plugin_ubuntu-reviews',
+ sources : 'gs-plugin-ubuntu-reviews.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, oauth ]
+ )
+endif
+
+if get_option('enable-firmware')
+ shared_module('gs_plugin_fwupd',
+ sources : 'gs-plugin-fwupd.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, fwupd ]
+ )
+ metainfos += 'org.gnome.Software.Plugin.Fwupd.metainfo.xml'
+endif
+
+if get_option('enable-packagekit')
+ shared_module('gs_plugin_systemd-updates',
+ sources : [
+ 'gs-plugin-systemd-updates.c',
+ 'packagekit-common.c',
+ 'packagekit-common.h'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, packagekit ]
+ )
+
+ shared_module('gs_plugin_packagekit',
+ sources : [
+ 'gs-plugin-packagekit.c',
+ 'packagekit-common.c',
+ 'packagekit-common.h'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, packagekit ]
+ )
+
+ shared_module('gs_plugin_packagekit-refine',
+ sources : [
+ 'gs-plugin-packagekit-refine.c',
+ 'gs-markdown.c',
+ 'gs-markdown.h',
+ 'packagekit-common.c',
+ 'packagekit-common.h'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, packagekit ]
+ )
+
+ shared_module('gs_plugin_packagekit-refresh',
+ sources : [
+ 'gs-plugin-packagekit-refresh.c',
+ 'packagekit-common.c',
+ 'packagekit-common.h'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, packagekit ]
+ )
+
+ shared_module('gs_plugin_packagekit-local',
+ sources : [
+ 'gs-plugin-packagekit-local.c',
+ 'packagekit-common.c',
+ 'packagekit-common.h'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, packagekit ]
+ )
+
+ shared_module('gs_plugin_packagekit-history',
+ sources : 'gs-plugin-packagekit-history.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, packagekit ]
+ )
+
+ shared_module('gs_plugin_packagekit-upgrade',
+ sources : [
+ 'gs-plugin-packagekit-upgrade.c',
+ 'packagekit-common.c',
+ 'packagekit-common.h'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, packagekit ]
+ )
+
+ shared_module('gs_plugin_packagekit-offline',
+ sources : 'gs-plugin-packagekit-offline.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, packagekit ]
+ )
+
+ shared_module('gs_plugin_packagekit-origin',
+ sources : [
+ 'gs-plugin-packagekit-origin.c',
+ 'packagekit-common.c',
+ 'packagekit-common.h'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, packagekit ]
+ )
+
+ shared_module('gs_plugin_packagekit-proxy',
+ sources : 'gs-plugin-packagekit-proxy.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, packagekit ])
+endif
+
+if get_option('enable-snap')
+ shared_module('gs_plugin_snap',
+ sources : [
+ 'gs-plugin-snap.c',
+ 'gs-snapd.h',
+ 'gs-snapd.c'
+ ],
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : [ plugin_libs, snap ]
+ )
+ metainfos += 'org.gnome.Software.Plugin.Snap.metainfo.xml'
+endif
+
+shared_module('gs_plugin_ubuntuone',
+ sources : 'gs-plugin-ubuntuone.c',
+ include_directories : [
+ include_directories('..'),
+ include_directories('../..'),
+ ],
+ install : true,
+ install_dir: plugin_dir,
+ dependencies : plugin_libs
+)
+
+foreach metainfo: metainfos
+ i18n.merge_file(
+ input: metainfo + '.in',
+ output: metainfo,
+ type: 'xml',
+ po_dir: join_paths(meson.source_root(), 'po'),
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'appdata')
+ )
+endforeach
+
+if get_option('enable-tests')
+ e = executable('gs-self-test2',
+ sources : [
+ 'gs-markdown.c',
+ 'gs-self-test.c'
+ ],
+ include_directories : [
+ include_directories('../..'),
+ ],
+ dependencies : [gtk, gio_unix, libm, appstream_glib ]
+ )
+ test('gs-self-test', e)
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]