forked from drath/libratbag
build: install ratbagd into sbindir
Ratbagd requires to be run by root. It should thus live in the system binary directory.
This commit is contained in:
committed by
Yaroslav Chvanov
parent
84e8e63752
commit
6a07d0ec9c
@@ -1,5 +1,5 @@
|
|||||||
[D-BUS Service]
|
[D-BUS Service]
|
||||||
Name=org.freedesktop.ratbag1
|
Name=org.freedesktop.ratbag1
|
||||||
Exec=@bindir@/ratbagd
|
Exec=@sbindir@/ratbagd
|
||||||
User=root
|
User=root
|
||||||
SystemdService=ratbagd.service
|
SystemdService=ratbagd.service
|
||||||
|
|||||||
39
meson.build
39
meson.build
@@ -399,11 +399,13 @@ deps_ratbagd = [
|
|||||||
dep_unistring,
|
dep_unistring,
|
||||||
]
|
]
|
||||||
|
|
||||||
executable('ratbagd',
|
executable(
|
||||||
src_ratbagd,
|
'ratbagd',
|
||||||
dependencies : deps_ratbagd,
|
src_ratbagd,
|
||||||
include_directories : include_directories('src'),
|
dependencies : deps_ratbagd,
|
||||||
install : true,
|
include_directories : include_directories('src'),
|
||||||
|
install : true,
|
||||||
|
install_dir : get_option('sbindir'),
|
||||||
)
|
)
|
||||||
|
|
||||||
install_man('ratbagd/ratbagd.8')
|
install_man('ratbagd/ratbagd.8')
|
||||||
@@ -462,14 +464,19 @@ if enable_systemd
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config_bindir = configuration_data()
|
config_sbindir = configuration_data()
|
||||||
config_bindir.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
|
config_sbindir.set(
|
||||||
|
'sbindir',
|
||||||
|
join_paths(get_option('prefix'), get_option('sbindir')),
|
||||||
|
)
|
||||||
|
|
||||||
if enable_systemd
|
if enable_systemd
|
||||||
configure_file(input : 'ratbagd/ratbagd.service.in',
|
configure_file(
|
||||||
output : 'ratbagd.service',
|
input : 'ratbagd/ratbagd.service.in',
|
||||||
configuration : config_bindir,
|
output : 'ratbagd.service',
|
||||||
install_dir : unitdir)
|
configuration : config_sbindir,
|
||||||
|
install_dir : unitdir,
|
||||||
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dbusdir = get_option('dbus-root-dir')
|
dbusdir = get_option('dbus-root-dir')
|
||||||
@@ -477,10 +484,12 @@ if dbusdir == ''
|
|||||||
dbusdir = join_paths(get_option('prefix'), get_option('datadir'), 'dbus-1')
|
dbusdir = join_paths(get_option('prefix'), get_option('datadir'), 'dbus-1')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
configure_file(input : 'dbus/org.freedesktop.ratbag1.service.in',
|
configure_file(
|
||||||
output : 'org.freedesktop.ratbag1.service',
|
input : 'dbus/org.freedesktop.ratbag1.service.in',
|
||||||
configuration : config_bindir,
|
output : 'org.freedesktop.ratbag1.service',
|
||||||
install_dir : join_paths(dbusdir, 'system-services'))
|
configuration : config_sbindir,
|
||||||
|
install_dir : join_paths(dbusdir, 'system-services')
|
||||||
|
)
|
||||||
|
|
||||||
dbusgroup = get_option('dbus-group')
|
dbusgroup = get_option('dbus-group')
|
||||||
if dbusgroup == ''
|
if dbusgroup == ''
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Description=Daemon to introspect and modify configurable mice
|
|||||||
[Service]
|
[Service]
|
||||||
Type=dbus
|
Type=dbus
|
||||||
BusName=org.freedesktop.ratbag1
|
BusName=org.freedesktop.ratbag1
|
||||||
ExecStart=@bindir@/ratbagd
|
ExecStart=@sbindir@/ratbagd
|
||||||
Restart=on-abort
|
Restart=on-abort
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
Reference in New Issue
Block a user