e184e5987f
It's better to use DT_RPATH dynamic section of the elf binary to store the paths of libraries to load instead of overwriting LD_LIBRARY_PATH for the whole environment, causing surprises. This solution is much more transparent and perfectly suitable for running contained installations of wayland/wlroots/sway. The code unsetting the LD_LIBRARY_PATH/LD_PRELOAD was also deleted as it's a placebo security at best - we should trust the execution path that leads us to running sway, and it's way too late to care about those variables since we already started executing our compositor, thus we would be compromised anyway.
53 lines
963 B
Meson
53 lines
963 B
Meson
sysconfdir = get_option('sysconfdir')
|
|
|
|
dependencies = [
|
|
cairo,
|
|
client_protos,
|
|
gdk_pixbuf,
|
|
math,
|
|
pango,
|
|
pangocairo,
|
|
xkbcommon,
|
|
wayland_client,
|
|
wlroots,
|
|
]
|
|
|
|
sources = [
|
|
'main.c',
|
|
'password.c',
|
|
'render.c',
|
|
'seat.c'
|
|
]
|
|
|
|
if libpam.found()
|
|
sources += ['pam.c']
|
|
dependencies += [libpam]
|
|
else
|
|
warning('The swaylock binary must be setuid when compiled without libpam')
|
|
warning('You must do this manually post-install: chmod a+s /path/to/swaylock')
|
|
sources += ['shadow.c']
|
|
endif
|
|
|
|
executable('swaylock',
|
|
sources,
|
|
include_directories: [sway_inc],
|
|
dependencies: dependencies,
|
|
link_with: [lib_sway_common, lib_sway_client],
|
|
install_rpath : rpathdir,
|
|
install: true
|
|
)
|
|
|
|
if is_freebsd
|
|
install_data(
|
|
'pam/swaylock.freebsd',
|
|
install_dir: sysconfdir + '/pam.d/',
|
|
rename: 'swaylock'
|
|
)
|
|
else
|
|
install_data(
|
|
'pam/swaylock.linux',
|
|
install_dir: sysconfdir + '/pam.d/',
|
|
rename: 'swaylock'
|
|
)
|
|
endif
|