Skip to content

Commit

Permalink
build: install symlinks natively with meson
Browse files Browse the repository at this point in the history
  • Loading branch information
williamh authored and navi-desu committed Jul 23, 2024
1 parent f943bc4 commit 466662d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
5 changes: 5 additions & 0 deletions src/openrc-init/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions tools/meson_final.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 466662d

Please sign in to comment.