diff options
author | Victor A. Santos <[email protected]> | 2020-03-30 18:54:42 -0300 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-09-03 13:19:35 +0200 |
commit | 1db4b409322e559a3d3a03677dd482a0613f3b29 (patch) | |
tree | 5b7f03980579416d78135db46287799eb0a6a0ba | |
parent | 301549e96d34a3b79fa471aaff5402689bf5868f (diff) | |
download | mate-power-manager-1db4b409322e559a3d3a03677dd482a0613f3b29.tar.bz2 mate-power-manager-1db4b409322e559a3d3a03677dd482a0613f3b29.tar.xz |
add meson project
fix indentation in some files
-rw-r--r-- | applets/brightness/config.h.in | 32 | ||||
-rw-r--r-- | applets/brightness/meson.build | 59 | ||||
-rw-r--r-- | applets/inhibit/config.h.in | 32 | ||||
-rw-r--r-- | applets/inhibit/meson.build | 58 | ||||
-rw-r--r-- | applets/meson.build | 2 | ||||
-rw-r--r-- | data/icons/meson.build | 56 | ||||
-rw-r--r-- | data/meson.build | 93 | ||||
-rwxr-xr-x | data/meson_post_install.py | 10 | ||||
-rw-r--r-- | help/LINGUAS | 116 | ||||
-rw-r--r-- | help/meson.build | 22 | ||||
-rw-r--r-- | meson.build | 69 | ||||
-rw-r--r-- | meson_options.txt | 4 | ||||
-rw-r--r-- | po/meson.build | 1 | ||||
-rw-r--r-- | policy/meson.build | 17 | ||||
-rw-r--r-- | src/config.h.in | 35 | ||||
-rw-r--r-- | src/meson.build | 151 |
16 files changed, 757 insertions, 0 deletions
diff --git a/applets/brightness/config.h.in b/applets/brightness/config.h.in new file mode 100644 index 0000000..8753c98 --- /dev/null +++ b/applets/brightness/config.h.in @@ -0,0 +1,32 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2020 Victor A. Santos <[email protected]> + * + * Licensed under the GNU General Public License Version 2 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* Project */ +#define VERSION "@version@" + +/* Directories */ +#define SYSCONFDIR "@sysconfdir@" +#define DATADIR "@datadir@" +#define BINDIR "@bindir@" +#define SBINDIR "@sbindir@" +#define MATELOCALEDIR "@localedir@" +#define GPM_ICONS_DATA "@iconsdir@" +#define BRIGHTNESS_MENU_UI_DIR "@uidir@" diff --git a/applets/brightness/meson.build b/applets/brightness/meson.build new file mode 100644 index 0000000..3394551 --- /dev/null +++ b/applets/brightness/meson.build @@ -0,0 +1,59 @@ +conf_data = configuration_data() +conf_data.set('version', meson.project_version()) +conf_data.set('sysconfdir', sysconfdir_path) +conf_data.set('datadir', datadir_path) +conf_data.set('bindir', bindir_path) +conf_data.set('sbindir', sbindir_path) +conf_data.set('localedir', localedir_path) +conf_data.set('iconsdir', iconsdir_path) +conf_data.set('uidir', uidir_path) +conf_data.set('gettext_package', meson.project_name()) + +configure_file(input: 'config.h.in', output: 'config.h', configuration: conf_data) + +executable( + 'mate-brightness-applet', + [ + 'brightness-applet.c', + 'gpm-common.c', + ], + dependencies: dependencies, + install: true, + install_dir: libexecdir_path +) + +desktop_data = configuration_data() +desktop_data.set('LIBEXECDIR', libexecdir_path) +desktop_data.set('VERSION', meson.project_version()) + +desktop_in = configure_file( + input: 'org.mate.BrightnessApplet.mate-panel-applet.desktop.in.in', + output: 'org.mate.BrightnessApplet.mate-panel-applet.desktop.in', + configuration: desktop_data +) + +i18n.merge_file( + input: desktop_in, + output: 'org.mate.BrightnessApplet.mate-panel-applet.desktop', + type: 'desktop', + po_dir: podir, + install: true, + install_dir: appletdir_path, +) + +service_data = configuration_data() +service_data.set('LIBEXECDIR', libexecdir_path) + +service_file = configure_file( + input: 'org.mate.panel.applet.BrightnessAppletFactory.service.in', + output: 'org.mate.panel.applet.BrightnessAppletFactory.service', + configuration: service_data, + install: true, + install_dir: servicedir_path +) + +install_data( + ['brightness-applet-menu.xml'], + install_dir: uidir_path +) + diff --git a/applets/inhibit/config.h.in b/applets/inhibit/config.h.in new file mode 100644 index 0000000..ccff4c9 --- /dev/null +++ b/applets/inhibit/config.h.in @@ -0,0 +1,32 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2020 Victor A. Santos <[email protected]> + * + * Licensed under the GNU General Public License Version 2 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* Project */ +#define VERSION "@version@" + +/* Directories */ +#define SYSCONFDIR "@sysconfdir@" +#define DATADIR "@datadir@" +#define BINDIR "@bindir@" +#define SBINDIR "@sbindir@" +#define MATELOCALEDIR "@localedir@" +#define GPM_ICONS_DATA "@iconsdir@" +#define INHIBIT_MENU_UI_DIR "@uidir@" diff --git a/applets/inhibit/meson.build b/applets/inhibit/meson.build new file mode 100644 index 0000000..ed807df --- /dev/null +++ b/applets/inhibit/meson.build @@ -0,0 +1,58 @@ +conf_data = configuration_data() +conf_data.set('version', meson.project_version()) +conf_data.set('sysconfdir', sysconfdir_path) +conf_data.set('datadir', datadir_path) +conf_data.set('bindir', bindir_path) +conf_data.set('sbindir', sbindir_path) +conf_data.set('localedir', localedir_path) +conf_data.set('iconsdir', iconsdir_path) +conf_data.set('uidir', uidir_path) +conf_data.set('gettext_package', meson.project_name()) + +configure_file(input: 'config.h.in', output: 'config.h', configuration: conf_data) + +executable( + 'mate-inhibit-applet', + [ + 'inhibit-applet.c', + 'gpm-common.c', + ], + dependencies: dependencies, + install: true, + install_dir: libexecdir_path +) + +desktop_data = configuration_data() +desktop_data.set('LIBEXECDIR', libexecdir_path) +desktop_data.set('VERSION', meson.project_version()) + +desktop_in = configure_file( + input: 'org.mate.InhibitApplet.mate-panel-applet.desktop.in.in', + output: 'org.mate.InhibitApplet.mate-panel-applet.desktop.in', + configuration: desktop_data +) + +i18n.merge_file( + input: desktop_in, + output: 'org.mate.InhibitApplet.mate-panel-applet.desktop', + type: 'desktop', + po_dir: podir, + install: true, + install_dir: appletdir_path, +) + +service_data = configuration_data() +service_data.set('LIBEXECDIR', libexecdir_path) + +service_file = configure_file( + input: 'org.mate.panel.applet.InhibitAppletFactory.service.in', + output: 'org.mate.panel.applet.InhibitAppletFactory.service', + configuration: service_data, + install: true, + install_dir: servicedir_path +) + +install_data( + ['inhibit-applet-menu.xml'], + install_dir: uidir_path +) diff --git a/applets/meson.build b/applets/meson.build new file mode 100644 index 0000000..521132d --- /dev/null +++ b/applets/meson.build @@ -0,0 +1,2 @@ +subdir('brightness') +subdir('inhibit') diff --git a/data/icons/meson.build b/data/icons/meson.build new file mode 100644 index 0000000..889731f --- /dev/null +++ b/data/icons/meson.build @@ -0,0 +1,56 @@ +actioniconsdir_path = join_paths(pkgdatadir_path, 'icons', 'hicolor') +appiconsdir_path = join_paths(datadir_path, 'icons', 'hicolor') +statusiconsdir_path = join_paths(pkgdatadir_path, 'icons', 'hicolor') + +foreach s: ['16x16', '22x22', '24x24', '32x32', '48x48', '64x64', '96x96', '128x128', '256x256'] + install_data( + [ + join_paths(s, 'actions', 'gpm-hibernate.png'), + join_paths(s, 'actions', 'gpm-suspend.png'), + ], + install_dir: join_paths(actioniconsdir_path, s, 'actions') + ) + + install_data( + [ + join_paths(s, 'apps', 'mate-brightness-applet.png'), + join_paths(s, 'apps', 'mate-inhibit-applet.png'), + join_paths(s, 'apps', 'mate-power-manager.png'), + join_paths(s, 'apps', 'mate-power-statistics.png'), + ], + install_dir: join_paths(appiconsdir_path, s, 'apps') + ) + install_data( + [ + join_paths(s, 'status', 'gpm-ac-adapter.png'), join_paths(s, 'status', 'gpm-keyboard-080.png'), + join_paths(s, 'status', 'gpm-battery-000-charging.png'), join_paths(s, 'status', 'gpm-keyboard-100.png'), + join_paths(s, 'status', 'gpm-battery-000.png'), join_paths(s, 'status', 'gpm-mouse-000.png'), + join_paths(s, 'status', 'gpm-battery-020-charging.png'), join_paths(s, 'status', 'gpm-mouse-020.png'), + join_paths(s, 'status', 'gpm-battery-020.png'), join_paths(s, 'status', 'gpm-mouse-040.png'), + join_paths(s, 'status', 'gpm-battery-040-charging.png'), join_paths(s, 'status', 'gpm-mouse-060.png'), + join_paths(s, 'status', 'gpm-battery-040.png'), join_paths(s, 'status', 'gpm-mouse-080.png'), + join_paths(s, 'status', 'gpm-battery-060-charging.png'), join_paths(s, 'status', 'gpm-mouse-100.png'), + join_paths(s, 'status', 'gpm-battery-060.png'), join_paths(s, 'status', 'gpm-phone-000.png'), + join_paths(s, 'status', 'gpm-battery-080-charging.png'), join_paths(s, 'status', 'gpm-phone-020.png'), + join_paths(s, 'status', 'gpm-battery-080.png'), join_paths(s, 'status', 'gpm-phone-040.png'), + join_paths(s, 'status', 'gpm-battery-100-charging.png'), join_paths(s, 'status', 'gpm-phone-060.png'), + join_paths(s, 'status', 'gpm-battery-100.png'), join_paths(s, 'status', 'gpm-phone-080.png'), + join_paths(s, 'status', 'gpm-battery-charged.png'), join_paths(s, 'status', 'gpm-phone-100.png'), + join_paths(s, 'status', 'gpm-battery-empty.png'), join_paths(s, 'status', 'gpm-ups-000-charging.png'), + join_paths(s, 'status', 'gpm-battery-missing.png'), join_paths(s, 'status', 'gpm-ups-000.png'), + join_paths(s, 'status', 'gpm-brightness-kbd-disabled.png'), join_paths(s, 'status', 'gpm-ups-020-charging.png'), + join_paths(s, 'status', 'gpm-brightness-kbd-invalid.png'), join_paths(s, 'status', 'gpm-ups-020.png'), + join_paths(s, 'status', 'gpm-brightness-kbd.png'), join_paths(s, 'status', 'gpm-ups-040-charging.png'), + join_paths(s, 'status', 'gpm-brightness-lcd-disabled.png'), join_paths(s, 'status', 'gpm-ups-040.png'), + join_paths(s, 'status', 'gpm-brightness-lcd-invalid.png'), join_paths(s, 'status', 'gpm-ups-060-charging.png'), + join_paths(s, 'status', 'gpm-brightness-lcd.png'), join_paths(s, 'status', 'gpm-ups-060.png'), + join_paths(s, 'status', 'gpm-inhibit-invalid.png'), join_paths(s, 'status', 'gpm-ups-080-charging.png'), + join_paths(s, 'status', 'gpm-inhibit.png'), join_paths(s, 'status', 'gpm-ups-080.png'), + join_paths(s, 'status', 'gpm-keyboard-000.png'), join_paths(s, 'status', 'gpm-ups-100-charging.png'), + join_paths(s, 'status', 'gpm-keyboard-020.png'), join_paths(s, 'status', 'gpm-ups-100.png'), + join_paths(s, 'status', 'gpm-keyboard-040.png'), join_paths(s, 'status', 'gpm-ups-missing.png'), + join_paths(s, 'status', 'gpm-keyboard-060.png'), + ], + install_dir: join_paths(statusiconsdir_path, s, 'status') + ) +endforeach diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..ad34149 --- /dev/null +++ b/data/meson.build @@ -0,0 +1,93 @@ +preferences_desktop_data = configuration_data() +preferences_desktop_data.set('VERSION', meson.project_version()) + +preferences_desktop = configure_file( + input: 'mate-power-preferences.desktop.in.in', + output: 'mate-power-preferences.desktop.in', + configuration: preferences_desktop_data +) + +statistics_desktop_data = configuration_data() +statistics_desktop_data.set('VERSION', meson.project_version()) + +statistics_desktop = configure_file( + input: 'mate-power-statistics.desktop.in.in', + output: 'mate-power-statistics.desktop.in', + configuration: statistics_desktop_data +) + +mpm_autostart_data = configuration_data() +mpm_autostart_data.set('VERSION', meson.project_version()) + +mpm_autostart = configure_file( + input: 'mate-power-manager.desktop.in.in', + output: 'mate-power-manager.desktop.in', + configuration: mpm_autostart_data +) + +mpm_service_data = configuration_data() +mpm_service_data.set('servicedir', servicedir_path) + +mpm_service = configure_file( + input: 'org.mate.PowerManager.service.in', + output: 'org.mate.PowerManager.service', + configuration: mpm_service_data, + install: true, + install_dir: servicedir_path +) + +mpm_gsettings_schema_data = configuration_data() +mpm_gsettings_schema_data.set('GETTEXT_PACKAGE', meson.project_name()) + +mpm_gsettings_schema = configure_file( + input: 'org.mate.power-manager.gschema.xml.in', + output: 'org.mate.power-manager.gschema.xml', + configuration: mpm_gsettings_schema_data, + install: true, + install_dir: join_paths(datadir_path, 'glib-2.0', 'schemas') +) +meson.add_install_script('meson_post_install.py') + +i18n.merge_file( + input: preferences_desktop, + output: 'mate-power-preferences.desktop', + type: 'desktop', + po_dir: podir, + install: true, + install_dir: desktopdir_path +) + +i18n.merge_file( + input: statistics_desktop, + output: 'mate-power-statistics.desktop', + type: 'desktop', + po_dir: podir, + install: true, + install_dir: desktopdir_path +) + +i18n.merge_file( + input: mpm_autostart, + output: 'mate-power-manager.desktop', + type: 'desktop', + po_dir: podir, + install: true, + install_dir: join_paths(sysconfdir_path, 'xdg', 'autostart') +) + +install_man( + [ + 'mate-power-manager.1', + 'mate-power-backlight-helper.1', + 'mate-power-statistics.1', + 'mate-power-preferences.1' + ], + install_dir: mandir_path +) + +install_data( + ['acme.ui'], + install_dir: pkgdatadir_path +) + +subdir('icons') diff --git a/data/meson_post_install.py b/data/meson_post_install.py new file mode 100755 index 0000000..d0248f4 --- /dev/null +++ b/data/meson_post_install.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 + +import os +import subprocess + +schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas') + +if not os.environ.get('DESTDIR'): + print('Compiling gsettings schemas...') + subprocess.call(['glib-compile-schemas', schemadir]) diff --git a/help/LINGUAS b/help/LINGUAS new file mode 100644 index 0000000..04a8aa0 --- /dev/null +++ b/help/LINGUAS @@ -0,0 +1,116 @@ +af +am +ar +as +ast +az +be +bg +bn +bn_IN +br +bs +ca +ca@valencia +cmn +crh +cs +cy +da +de +dz +el +en_AU +en_CA +en_GB +eo +es +es_AR +es_CL +es_CO +es_ES +es_MX +es_PR +et +eu +fa +fi +fr +frp +fur +fy +ga +gl +gu +ha +he +hi +hr +hu +hy +id +ie +ig +is +it +ja +jv +ka +kab +kk +kn +ko +ku +ku_IQ +ky +la +lt +lv +mai +mg +mi +mk +ml +mn +mr +ms +nb +nds +ne +nl +nn +nso +oc +or +pa +pl +ps +pt +pt_BR +ro +ru +si +sk +sl +sq +sr +sr@latin +sv +ta +te +th +tk +tr +ug +uk +ur +uz +vi +wa +xh +yo +zh_CN +zh-Hans +zh_HK +zh_TW +zu diff --git a/help/meson.build b/help/meson.build new file mode 100644 index 0000000..24b8c4c --- /dev/null +++ b/help/meson.build @@ -0,0 +1,22 @@ +gnome.yelp( + meson.project_name(), + media: [ + 'figures/applet-brightness.png', + 'figures/applet-inhibit.png', + 'figures/gpm-cell-capacity.png', + 'figures/gpm-charged.png', + 'figures/gpm-critical.png', + 'figures/gpm-low.png', + 'figures/gpm-prefs-ac.png', + 'figures/gpm-prefs-battery.png', + 'figures/gpm-prefs-general.png', + 'figures/gpm-stats-graph.png', + 'figures/gpm-suspend-problem.png', + 'figures/gpm-unplugged.png', + 'figures/gs-prefs.png', + ], + sources: [ + 'index.docbook', + 'legal.xml' + ] +) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..914f3f5 --- /dev/null +++ b/meson.build @@ -0,0 +1,69 @@ +project('mate-power-manager', 'c', version : '1.24.0') + +gnome = import('gnome') +dbus_binding_tool = find_program('dbus-binding-tool') + +i18n = import('i18n') +add_project_arguments( + [ + '-DGETTEXT_PACKAGE="' + meson.project_name() + '"', + '-DHAVE_CONFIG_H' + ], + language: 'c' +) + +cc = meson.get_compiler('c') +m_dep = cc.find_library('m', required: false) + +dependencies = [ + m_dep, + dependency('glib-2.0', version: '>=2.50.0'), + dependency('gobject-2.0'), + dependency('gio-2.0 ', version: '>=2.50.0'), + dependency('gio-unix-2.0'), + dependency('libcanberra-gtk3', version: '>=0.10'), + dependency('dbus-glib-1', version: '>=0.70'), + dependency('dbus-1', version: '>=1.0'), + dependency('gthread-2.0',), + dependency('gtk+-3.0', version: '>=3.22.0'), + dependency('cairo', version: '>=1.0.0'), + dependency('gdk-3.0', version: '>=3.22.0'), + dependency('gdk-x11-3.0', version: '>=3.22.0'), + dependency('xrandr', version: '>=1.3.0'), + dependency('x11'), + dependency('xext'), + dependency('xproto', version: '>=7.0.15'), + dependency('libnotify', version: '>=0.7.0'), + dependency('upower-glib', version: '>=0.99.8'), + dependency('gnome-keyring-1', version: '>=3.0.0', required: get_option('keyring')), +] + +# defult paths +prefix_path = get_option('prefix') +sysconfdir_path = join_paths(prefix_path, get_option('sysconfdir')) +datadir_path = join_paths(prefix_path, get_option('datadir')) +pkgdatadir_path = join_paths(datadir_path, meson.project_name()) +bindir_path = join_paths(prefix_path, get_option('bindir')) +sbindir_path = join_paths(prefix_path, get_option('sbindir')) +libexecdir_path = join_paths(prefix_path, get_option('libexecdir')) +localedir_path = join_paths(prefix_path, get_option('localedir')) +iconsdir_path = join_paths(datadir_path, 'icons') +uidir_path = join_paths(pkgdatadir_path, 'ui') +servicedir_path = join_paths(datadir_path, 'dbus-1', 'services') +appletdir_path = join_paths(datadir_path, 'mate-panel', 'applets') +desktopdir_path = join_paths(datadir_path, 'applications') +mandir_path = join_paths(prefix_path, get_option('mandir')) + +podir = join_paths(meson.source_root(), 'po') + +if get_option('applets').enabled() + dependencies += dependency('libmatepanelapplet-4.0') + + subdir('applets') +endif + +subdir('data') +subdir('help') +subdir('po') +subdir('policy') +subdir('src') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..c8ed4ef --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,4 @@ +option('enable-deprecated', type: 'boolean', value: false, description: 'Warn about deprecated usages') +option('keyring', type: 'feature', value: 'auto', description: 'Enable the use of gnome-keyring') +option('applets', type: 'feature', value: 'enabled', description: 'Build the extra power applets') +option('with-dbus-services', type: 'string', description: 'where D-BUS services directory is') diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..e9b77d7 --- /dev/null +++ b/po/meson.build @@ -0,0 +1 @@ +i18n.gettext(meson.project_name(), preset: 'glib') diff --git a/policy/meson.build b/policy/meson.build new file mode 100644 index 0000000..1b012b0 --- /dev/null +++ b/policy/meson.build @@ -0,0 +1,17 @@ +backlight_policy_data = configuration_data() +backlight_policy_data.set('sbindir', sbindir_path) + +backlight_policy = configure_file( + input: 'org.mate.power.policy.in2', + output: 'org.mate.power.policy.in', + configuration: backlight_policy_data +) + +i18n.merge_file( + input: backlight_policy, + output: 'org.mate.power.policy', + type: 'xml', + po_dir: podir, + install: true, + install_dir: join_paths(datadir_path, 'polkit-1', 'actions') +) diff --git a/src/config.h.in b/src/config.h.in new file mode 100644 index 0000000..25af2cd --- /dev/null +++ b/src/config.h.in @@ -0,0 +1,35 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2020 Victor A. Santos <[email protected]> + * + * Licensed under the GNU General Public License Version 2 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* Project */ +#define VERSION "@version@" + +/* Directories */ +#define SYSCONFDIR "@sysconfdir@" +#define DATADIR "@datadir@" +#define BINDIR "@bindir@" +#define SBINDIR "@sbindir@" +#define MATELOCALEDIR "@localedir@" +#define GPM_ICONS_DATA "@iconsdir@" +#define GTKBUILDERDIR "@datadir@" + +/* Features */ +#mesondefine WITH_KEYRING diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..0c72490 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,151 @@ +# configuration +conf_data = configuration_data() +conf_data.set('version', meson.project_version()) +conf_data.set('sysconfdir', sysconfdir_path) +conf_data.set('datadir', datadir_path) +conf_data.set('bindir', bindir_path) +conf_data.set('sbindir', sbindir_path) +conf_data.set('localedir', localedir_path) +conf_data.set('iconsdir', iconsdir_path) +conf_data.set('gettext_package', meson.project_name()) +conf_data.set('WITH_KEYRING', get_option('keyring').enabled()) + +configure_file(input: 'config.h.in', output: 'config.h', configuration: conf_data) + +gpm_marshal = gnome.genmarshal('gpm-marshal', sources: 'gpm-marshal.list', prefix: 'gpm_marshal') + +dbus_binding_powermanager = custom_target('org.mate.PowerManager.h', + input: 'org.mate.PowerManager.xml', + output: 'org.mate.PowerManager.h', + command: [dbus_binding_tool, '--prefix=gpm_manager', '--mode=glib-server', '--output=@OUTPUT@', '@INPUT@'] +) + +dbus_binding_backlight = custom_target('org.mate.PowerManager.Backlight.h', + input: 'org.mate.PowerManager.Backlight.xml', + output: 'org.mate.PowerManager.Backlight.h', + command: [dbus_binding_tool, '--prefix=gpm_backlight', '--mode=glib-server', '--output=@OUTPUT@', '@INPUT@'] +) + +dbus_binding_kbdbacklight = custom_target('org.mate.PowerManager.KbdBacklight.h', + input: 'org.mate.PowerManager.KbdBacklight.xml', + output: 'org.mate.PowerManager.KbdBacklight.h', + command: [dbus_binding_tool, '--prefix=gpm_kbd_backlight', '--mode=glib-server', '--output=@OUTPUT@', '@INPUT@'] +) + +statics_resources = gnome.compile_resources( + 'mate-power-statistics-resources', + '../data/org.mate.power-manager.statistics.gresource.xml', + c_name: 'statistics', + source_dir: '../data' +) + +preferences_resources = gnome.compile_resources( + 'mate-power-preferences-resources', + '../data/org.mate.power-manager.preferences.gresource.xml', + c_name: 'preferences', + source_dir: '../data' +) + +power_manager_resources = gnome.compile_resources( + 'mate-power-manager-resources', + '../data/org.mate.power-manager.manager.gresource.xml', + c_name: 'preferences', + source_dir: '../data' +) + +src_libgpmshared_a = [ + gpm_marshal, + dbus_binding_powermanager, + dbus_binding_backlight, + dbus_binding_kbdbacklight, + 'egg-color.c', + 'egg-color.h', + 'egg-precision.h', + 'egg-precision.c', + 'egg-array-float.c', + 'egg-array-float.h', + 'egg-idletime.h', + 'egg-idletime.c', + 'egg-discrete.h', + 'egg-discrete.c', + 'egg-console-kit.h', + 'egg-console-kit.c', + 'gpm-common.h', + 'gpm-common.c', + 'gpm-brightness.h', + 'gpm-brightness.c', + 'gpm-upower.c', + 'gpm-upower.h', +] + +mpm_static_lib = static_library('libgpmshared', src_libgpmshared_a, dependencies: dependencies) + +executable('mate-power-backlight-helper', 'gpm-backlight-helper.c', dependencies: dependencies, link_with: [mpm_static_lib]) + +executable( + 'mate-power-statistics', + [ + 'gpm-statistics.c', + 'gpm-point-obj.c', + 'gpm-point-obj.h', + 'gpm-graph-widget.h', + 'gpm-graph-widget.c' + ], + dependencies: dependencies, + link_with: [mpm_static_lib] +) + +executable( + 'mate-power-preferences', + [ + preferences_resources, + 'gpm-prefs.c', + 'gpm-prefs-core.h', + 'gpm-prefs-core.c' + ], + dependencies: dependencies, + link_with: [mpm_static_lib] +) + +executable( + 'mate-power-manager', + [ + power_manager_resources, + 'gpm-dpms.h', + 'gpm-dpms.c', + 'gpm-phone.h', + 'gpm-phone.c', + 'gpm-backlight.h', + 'gpm-backlight.c', + 'gpm-idle.h', + 'gpm-idle.c', + 'gpm-load.h', + 'gpm-load.c', + 'gpm-control.h', + 'gpm-control.c', + 'gpm-button.h', + 'gpm-button.c', + 'gpm-kbd-backlight.h', + 'gpm-kbd-backlight.c', + 'gpm-main.c', + 'gpm-manager.h', + 'gpm-manager.c', + 'gpm-tray-icon.h', + 'gpm-tray-icon.c', + 'gpm-screensaver.h', + 'gpm-screensaver.c', + 'gpm-session.h', + 'gpm-session.c', + 'gpm-networkmanager.h', + 'gpm-networkmanager.c', + 'gpm-icon-names.h', + 'gsd-media-keys-window.h', + 'gsd-media-keys-window.c', + 'msd-osd-window.h', + 'msd-osd-window.c', + 'gpm-engine.h', + 'gpm-engine.c', + ], + dependencies: dependencies, + link_with: [mpm_static_lib], + install : true) |