From cfb3111f536f51583a05adc100ba25db7de837bb Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 23 Jul 2024 08:46:35 -0500 Subject: [PATCH] build: install symlinks natively with meson --- meson.build | 2 +- src/openrc-init/meson.build | 5 +++++ tools/meson_final.sh | 3 --- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index e61911340..46ef167aa 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ project('OpenRC', 'c', 'prefix=/usr', 'warning_level=3', ], - meson_version : '>=0.56.0' # pkgconfig dict support + meson_version : '>=0.61.0' ) cc = meson.get_compiler('c') diff --git a/src/openrc-init/meson.build b/src/openrc-init/meson.build index 08cc318d5..199dc65cb 100644 --- a/src/openrc-init/meson.build +++ b/src/openrc-init/meson.build @@ -7,4 +7,9 @@ if os == 'Linux' dependencies: [dl_dep, selinux_dep], install: true, install_dir: sbindir) + if get_option('sysvinit') + install_symlink('init', + pointing_to: 'openrc-init', + install_dir: sbindir) + endif endif diff --git a/tools/meson_final.sh b/tools/meson_final.sh index ef91f9e36..48b1f9362 100755 --- a/tools/meson_final.sh +++ b/tools/meson_final.sh @@ -12,6 +12,3 @@ if [ "${os}" != Linux ]; then install -d "${DESTDIR}/${rc_libexecdir}"/init.d fi install -m 644 "${MESON_BUILD_ROOT}/src/shared/version" "${DESTDIR}/${rc_libexecdir}" -if [ "${os}" = Linux ] && [ "${sysvinit}" = yes ]; then - ln -sf openrc-init "${DESTDIR}/${sbindir}"/init -fi