mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
build: make systemd dependency optional
The systemd dependency is only used to install some systemd service files. This can easily be made optional.
This commit is contained in:
committed by
Benjamin Berg
parent
1fc10f15ee
commit
5aa61adabc
@ -11,7 +11,8 @@ configure_file(
|
|||||||
install_dir: dbus_service_dir,
|
install_dir: dbus_service_dir,
|
||||||
)
|
)
|
||||||
|
|
||||||
configure_file(
|
if get_option('systemd')
|
||||||
|
configure_file(
|
||||||
configuration: configuration_data({
|
configuration: configuration_data({
|
||||||
'libexecdir': fprintd_installdir,
|
'libexecdir': fprintd_installdir,
|
||||||
}),
|
}),
|
||||||
@ -19,7 +20,8 @@ configure_file(
|
|||||||
output: 'fprintd.service',
|
output: 'fprintd.service',
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: systemd_unit_dir,
|
install_dir: systemd_unit_dir,
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
polkit_policy = 'net.reactivated.fprint.device.policy'
|
polkit_policy = 'net.reactivated.fprint.device.policy'
|
||||||
polkit_policy_target = i18n.merge_file(polkit_policy,
|
polkit_policy_target = i18n.merge_file(polkit_policy,
|
||||||
|
|||||||
@ -94,13 +94,17 @@ pod2man = find_program('pod2man', required: get_option('man'))
|
|||||||
xsltproc = find_program('xsltproc', required: get_option('gtk_doc'))
|
xsltproc = find_program('xsltproc', required: get_option('gtk_doc'))
|
||||||
|
|
||||||
# StateDirectory was introduced in systemd 235
|
# StateDirectory was introduced in systemd 235
|
||||||
systemd_dep = dependency('systemd', version: '>= 235')
|
systemd_dep = dependency('systemd', version: '>= 235', required: false)
|
||||||
systemd_unit_dir = get_option('systemd_system_unit_dir')
|
systemd_unit_dir = get_option('systemd_system_unit_dir')
|
||||||
|
|
||||||
if systemd_unit_dir == ''
|
if systemd_unit_dir == '' and systemd_dep.found()
|
||||||
systemd_unit_dir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
|
systemd_unit_dir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if get_option('systemd') and systemd_unit_dir == ''
|
||||||
|
error('systemd development files or systemd_system_unit_dir is needed for systemd support.')
|
||||||
|
endif
|
||||||
|
|
||||||
dbus_service_dir = get_option('dbus_service_dir')
|
dbus_service_dir = get_option('dbus_service_dir')
|
||||||
dbus_data_dir = datadir
|
dbus_data_dir = datadir
|
||||||
dbus_interfaces_dir = ''
|
dbus_interfaces_dir = ''
|
||||||
|
|||||||
@ -6,6 +6,10 @@ option('man',
|
|||||||
description: 'Generate the man files',
|
description: 'Generate the man files',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
value: true)
|
value: true)
|
||||||
|
option('systemd',
|
||||||
|
description: 'Install system service files',
|
||||||
|
type: 'boolean',
|
||||||
|
value: true)
|
||||||
option('systemd_system_unit_dir',
|
option('systemd_system_unit_dir',
|
||||||
description: 'Directory for systemd service files',
|
description: 'Directory for systemd service files',
|
||||||
type: 'string')
|
type: 'string')
|
||||||
|
|||||||
Reference in New Issue
Block a user