1From 89c42e7e0d8d5913789a76b007ed6a0c43078c63 Mon Sep 17 00:00:00 2001
2From: artoo <artoo@artixlinux.org>
3Date: Wed, 8 Sep 2021 22:41:58 +0200
4Subject: [PATCH] allow setting rc_libexecdir path
5
6  - Allow to change the rc dir name of the rc_libexecdir path
7  - Introduce a librcdir option for override with value 'rc'
8
9Upstream: https://github.com/OpenRC/openrc/pull/443
10
11Signed-off-by: artoo <artoo@artixlinux.org>
12[Adam: update for 0.50]
13Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
14---
15 meson.build       | 2 +-
16 meson_options.txt | 2 ++
17 2 files changed, 3 insertions(+), 1 deletion(-)
18
19diff --git a/meson.build b/meson.build
20index 5b3f8fa..40d4be1 100644
21--- a/meson.build
22+++ b/meson.build
23@@ -102,7 +102,7 @@ if os == 'Linux' and libexecdir == 'libexec'
24   libexecdir = 'lib'
25 endif
26 libexecdir = rootprefix / libexecdir
27-rc_libexecdir = libexecdir / 'rc'
28+rc_libexecdir = libexecdir / get_option('librcdir')
29 rc_bindir = rc_libexecdir / 'bin'
30 rc_sbindir = rc_libexecdir / 'sbin'
31 rc_shdir = rc_libexecdir / 'sh'
32diff --git a/meson_options.txt b/meson_options.txt
33index 2c74152..d2f67e4 100644
34--- a/meson_options.txt
35+++ b/meson_options.txt
36@@ -37,3 +37,5 @@ option('termcap', type : 'combo',
37   description : 'the termcap library to use')
38 option('zsh-completions', type : 'boolean',
39   description : 'install zsh completions')
40+option('librcdir', type : 'string', value : 'rc',
41+  description : 'default location of rc libexec dir')
42--
432.41.0
44
45