1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
po_dir = join_paths(meson.source_root(), 'po')
source_files = files(
'gpm-common.c',
'power-profiles-applet.c'
)
cflags = [
'-DMATELOCALEDIR="@0@"'.format(matelocaledir),
'-DG_LOG_DOMAIN="~/mate-power-manager.log"',
'-DGPM_ICONS_DATA="@0@"'.format(mateicons),
'-DPOWER_PROFILES_MENU_UI_DIR="@0@"'.format(mateui),
'-DEGG_VERBOSE="GPM_VERBOSE"',
'-DEGG_LOGGING="GPM_LOGGING"',
'-DEGG_CONSOLE="GPM_CONSOLE"'
]
if enable_applets_inprocess
shared_library('mate-power-profiles-applet',
sources: source_files,
dependencies : [
gtk,
glib,
cairo,
notify,
dbus,
dbusglib,
matepanel
],
include_directories : config_inc,
c_args : cflags,
install : true,
install_dir: join_paths(get_option('libdir'), meson.project_name()),
)
else
executable('mate-power-profiles-applet',
sources: source_files,
dependencies : [
gtk,
glib,
cairo,
notify,
dbus,
dbusglib,
matepanel
],
include_directories : config_inc,
c_args : cflags,
install : true,
install_dir: mateexecdir,
)
# .service files
service_data = configuration_data()
service_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir')))
configure_file(
input : 'org.mate.panel.applet.PowerProfilesAppletFactory.service.in',
output : 'org.mate.panel.applet.PowerProfilesAppletFactory.service',
configuration : service_data,
install : true,
install_dir : join_paths(matedatadir, 'dbus-1/services')
)
endif
desktop_data = configuration_data()
desktop_data.set('VERSION', meson.project_version())
if enable_applets_inprocess
desktop_data.set('APPLET_IN_PROCESS', 'true')
desktop_data.set('APPLET_LOCATION', join_paths(prefix, get_option('libdir'), meson.project_name(), 'libmate-power-profiles-applet.so'))
else
desktop_data.set('APPLET_IN_PROCESS', 'false')
desktop_data.set('APPLET_LOCATION', join_paths(prefix, get_option('libexecdir'), 'mate-power-profiles-applet'))
endif
desktop_in_file = configure_file(
input : 'org.mate.PowerProfilesApplet.mate-panel-applet.desktop.in.in',
output : 'org.mate.PowerProfilesApplet.mate-panel-applet.desktop.in',
configuration : desktop_data
)
i18n.merge_file(
input : desktop_in_file,
output : 'org.mate.PowerProfilesApplet.mate-panel-applet',
type : 'desktop',
po_dir : po_dir,
install : true,
install_dir : join_paths(matedatadir, 'mate-panel', 'applets')
)
install_data('power-profiles-applet-menu.xml',
install_dir : join_paths(pkgdatadir, 'ui')
)
|