diff options
author | Dmitry V. Levin <ldv@strace.io> | 2024-12-04 12:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-12-04 12:00:00 +0000 |
commit | c6efd4e8696233c8c180a10dbcbcb035e1bd8536 (patch) | |
tree | 7b831fb8608e93e3f0abcf00197069f55aee9628 | |
parent | a2fb0dd306db943e4165f530534b01d00298065f (diff) | |
download | pam-c6efd4e8696233c8c180a10dbcbcb035e1bd8536.tar.gz pam-c6efd4e8696233c8c180a10dbcbcb035e1bd8536.tar.bz2 pam-c6efd4e8696233c8c180a10dbcbcb035e1bd8536.zip |
meson.build: fix pam_namespace.service installation with custom prefix
When build is configured with a custom prefix, ignore the value of
systemdsystemunitdir pkgconfig variable if it doesn't start with that
custom prefix.
Resolves: https://github.com/linux-pam/linux-pam/issues/863
-rw-r--r-- | meson.build | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 307fed0a..e8f13b71 100644 --- a/meson.build +++ b/meson.build @@ -334,10 +334,13 @@ if systemdunitdir == '' systemdunitdir = prefixdir / 'lib' / 'systemd' / 'system' systemd = dependency('systemd', required: false) if systemd.found() - systemdunitdir = systemd.get_variable( + systemdsystemunitdir = systemd.get_variable( pkgconfig: 'systemdsystemunitdir', default_value: systemdunitdir, ) + if systemdsystemunitdir.startswith(prefixdir / '') + systemdunitdir = systemdsystemunitdir + endif endif endif |