From b90b21f26b23094da16be2fa7ec4862e865b32dc Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 10 Feb 2020 14:43:52 +0100 Subject: [PATCH] build: Make pam module installation dir configurable And avoid treating "libdir" as an absolute path, the documentation clearly states that it is "relative to the prefix". Based on patch by Timothy Gu --- meson_options.txt | 3 +++ pam/meson.build | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index 0b2254e..be31fe1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,6 +12,9 @@ option('systemd_system_unit_dir', option('dbus_service_dir', description: 'Directory for dbus service files', type: 'string') +option('pam_modules_dir', + description: 'Directory for PAM modules', + type: 'string') option('gtk_doc', type: 'boolean', value: false, diff --git a/pam/meson.build b/pam/meson.build index 6a342b0..e95bcde 100644 --- a/pam/meson.build +++ b/pam/meson.build @@ -1,5 +1,8 @@ mapfile = files('pam_fprintd.ver') -pam_modules_dir = '/' + get_option('libdir') / 'security' +pam_modules_dir = get_option('pam_modules_dir') +if pam_modules_dir == '' + pam_modules_dir = '/' / get_option('libdir') / 'security' +endif pam_fprintd = shared_module('pam_fprintd', name_prefix: '',