summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-10 14:47:12 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-10 14:47:12 +0900
commitf9dae2400c201567dde0e92e62ebfbb60ed3d3a7 (patch)
tree30c5e898b39c8f180d6bfb2c625a07859f3669ec /data
parent15cb70f13ae440e47453e94ee063c48bc3b2b1e2 (diff)
move sysaction specific configure val detection to the etc subdir
Diffstat (limited to 'data')
-rw-r--r--data/etc/meson.build78
1 files changed, 69 insertions, 9 deletions
diff --git a/data/etc/meson.build b/data/etc/meson.build
index 2fd358ff6..b5a43a5cf 100644
--- a/data/etc/meson.build
+++ b/data/etc/meson.build
@@ -1,15 +1,75 @@
1HALT = '/sbin/shutdown -h now'
2REBOOT = '/sbin/shutdown -r now'
3SUSPEND = ''
4HIBERNATE = ''
5MOUNT = '/bin/mount'
6UMOUNT = '/bin/umount'
7EJECT = '/usr/bin/eject'
8
9if host_machine.system().contains('bsd') == true
10 #SUSPEND = 'acpiconf -s3'
11 SUSPEND = '/usr/sbin/zzz'
12 HIBERNATE = 'acpiconf -s4'
13 HALT = '/sbin/shutdown -p now'
14 MOUNT = '/sbin/mount'
15 UMOUNT = '/sbin/umount'
16 EJECT = '/usr/sbin/cdcontrol eject'
17else
18 if systemd_unitdir != ''
19 HALT = '/usr/bin/systemctl poweroff'
20 REBOOT = '/usr/bin/systemctl reboot'
21 SUSPEND = '/usr/bin/systemctl suspend'
22 HIBERNATE = '/usr/bin/systemctl hibernate'
23 else
24 sleep = find_program('sleep.sh', '/etc/acpi/sleep.sh', '/sbin/sleep.sh', '/usr/sbin/sleep.sh')
25 if sleep.found() == true
26 SUSPEND = sleep.path()
27 if sleep.path() == '/etc/acpi/sleep.sh'
28 SUSPEND = '/etc/acpi/sleep.sh force'
29 endif
30 else
31 suspend = find_program('pm-suspend', '/etc/acpi/pm-suspend', '/sbin/pm-suspend', '/usr/sbin/pm-suspend')
32 if suspend.found()
33 SUSPEND = suspend.path()
34 endif
35 endif
36
37 hibernate_sh = find_program('hibernate.sh', '/etc/acpi/hibernate.sh', '/sbin/hibernate.sh', '/usr/sbin/hibernate.sh')
38 if hibernate_sh.found() == true
39 HIBERNATE = hibernate_sh.path()
40 if hibernate_sh.path() == '/etc/acpi/hibernate.sh'
41 SUSPEND = '/etc/acpi/hibernate.sh force'
42 endif
43 else
44 hibernate = find_program('pm-hibernate', '/etc/acpi/pm-hibernate', '/sbin/pm-hibernate', '/usr/sbin/pm-hibernate')
45 if hibernate.found()
46 HIBERNATE = hibernate.path()
47 endif
48 endif
49 endif
50endif
51
52sysactions = configuration_data()
53sysactions.set('HALT' , HALT)
54sysactions.set('REBOOT' , REBOOT)
55sysactions.set('SUSPEND' , SUSPEND)
56sysactions.set('HIBERNATE', HIBERNATE)
57sysactions.set('MOUNT' , MOUNT)
58sysactions.set('UMOUNT' , UMOUNT)
59sysactions.set('EJECT' , EJECT)
60
1if get_option('install-sysactions') 61if get_option('install-sysactions')
2 configure_file(input: 'sysactions.conf.in', 62 configure_file(input : 'sysactions.conf.in',
3 output: 'sysactions.conf', 63 output : 'sysactions.conf',
4 install: true, 64 install : true,
5 install_dir: join_paths(dir_sysconf, 'enlightenment'), 65 install_dir : join_paths(dir_sysconf, 'enlightenment'),
6 configuration: sysactions 66 configuration: sysactions
7 ) 67 )
8endif 68endif
9 69
10if get_option('install-enlightenment-menu') 70if get_option('install-enlightenment-menu')
11 install_data('e-applications.menu', 71 install_data('e-applications.menu',
12 install_dir: join_paths(dir_sysconf, 'xdg/menus') 72 install_dir: join_paths(dir_sysconf, 'xdg/menus')
13 ) 73 )
14endif 74endif
15 75