meson: create various symlinks
v2: - remove bashisms
This commit is contained in:
parent
94e75a5409
commit
7b76fce1a5
|
@ -385,6 +385,7 @@ stat = find_program('stat')
|
||||||
git = find_program('git', required : false)
|
git = find_program('git', required : false)
|
||||||
etags = find_program('etags', required : false)
|
etags = find_program('etags', required : false)
|
||||||
|
|
||||||
|
meson_make_symlink = meson.source_root() + '/tools/meson-make-symlink.sh'
|
||||||
mkdir_p = 'mkdir -p $DESTDIR/@0@'
|
mkdir_p = 'mkdir -p $DESTDIR/@0@'
|
||||||
|
|
||||||
# if -Dxxx-path option is found, use that. Otherwise, check in $PATH,
|
# if -Dxxx-path option is found, use that. Otherwise, check in $PATH,
|
||||||
|
@ -1127,6 +1128,10 @@ if conf.get('ENABLE_ENVIRONMENT_D', 0) == 1
|
||||||
install_dir : userenvgeneratordir,
|
install_dir : userenvgeneratordir,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared])
|
link_with : [libshared])
|
||||||
|
|
||||||
|
meson.add_install_script(meson_make_symlink,
|
||||||
|
sysconfdir + '/environment',
|
||||||
|
environmentdir + '/99-environment.conf')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if conf.get('ENABLE_HIBERNATE', 0) == 1
|
if conf.get('ENABLE_HIBERNATE', 0) == 1
|
||||||
|
@ -1705,6 +1710,9 @@ executable('systemd-mount',
|
||||||
link_with : [libshared],
|
link_with : [libshared],
|
||||||
install : true)
|
install : true)
|
||||||
|
|
||||||
|
meson.add_install_script(meson_make_symlink,
|
||||||
|
'systemd-mount', bindir + '/systemd-umount')
|
||||||
|
|
||||||
executable('systemd-run',
|
executable('systemd-run',
|
||||||
'src/run/run.c',
|
'src/run/run.c',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
|
|
11
tools/meson-make-symlink.sh
Normal file
11
tools/meson-make-symlink.sh
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# this is needed mostly because $DESTDIR is provided as a variable,
|
||||||
|
# and we need to create the target directory...
|
||||||
|
|
||||||
|
mkdir -vp "$(dirname "${DESTDIR}$2")"
|
||||||
|
if [ "$(dirname $1)" = . ]; then
|
||||||
|
ln -vfs -T "$1" "${DESTDIR}$2"
|
||||||
|
else
|
||||||
|
ln -vfs -T --relative "${DESTDIR}$1" "${DESTDIR}$2"
|
||||||
|
fi
|
|
@ -307,6 +307,12 @@ foreach tuple : m4_in_units
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
meson.add_install_script(meson_make_symlink,
|
||||||
|
pkgsysconfdir + '/user',
|
||||||
|
sysconfdir + '/xdg/systemd/user')
|
||||||
|
meson.add_install_script(meson_make_symlink,
|
||||||
|
dbussystemservicedir + '/org.freedesktop.systemd1.service',
|
||||||
|
dbussessionservicedir + '/org.freedesktop.systemd1.service')
|
||||||
if conf.get('HAVE_SYSV_COMPAT', 0) == 1
|
if conf.get('HAVE_SYSV_COMPAT', 0) == 1
|
||||||
foreach i : [1, 2, 3, 4, 5]
|
foreach i : [1, 2, 3, 4, 5]
|
||||||
meson.add_install_script('sh', '-c',
|
meson.add_install_script('sh', '-c',
|
||||||
|
|
Loading…
Reference in a new issue