summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorVictor A. Santos <[email protected]>2020-03-30 18:54:42 -0300
committerraveit65 <[email protected]>2020-09-03 13:19:35 +0200
commit1db4b409322e559a3d3a03677dd482a0613f3b29 (patch)
tree5b7f03980579416d78135db46287799eb0a6a0ba /data
parent301549e96d34a3b79fa471aaff5402689bf5868f (diff)
downloadmate-power-manager-1db4b409322e559a3d3a03677dd482a0613f3b29.tar.bz2
mate-power-manager-1db4b409322e559a3d3a03677dd482a0613f3b29.tar.xz
add meson project
fix indentation in some files
Diffstat (limited to 'data')
-rw-r--r--data/icons/meson.build56
-rw-r--r--data/meson.build93
-rwxr-xr-xdata/meson_post_install.py10
3 files changed, 159 insertions, 0 deletions
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])