When compiled in Flatpak /usr is read-only and the /app prefix is used.
However, the binary installation did not use the prefix but had /usr
hardcoded.
Use the prefix instead of /usr when assembling the prefix/(s)bin paths.
Signed-off-by: Kai Lüke <kailueke@riseup.net>
docdir = join_paths(prefixdir, get_option('datadir'), 'doc', 'util-linux')
mandir = join_paths(prefixdir, get_option('mandir'))
runstatedir = '/run'
-execprefixdir = '/usr'
-usrbin_exec_dir = join_paths(execprefixdir, 'bin')
-usrsbin_exec_dir = join_paths(execprefixdir, 'sbin')
+execprefixdir = prefixdir
+usrbin_exec_dir = join_paths(execprefixdir, bindir)
+usrsbin_exec_dir = join_paths(execprefixdir, sbindir)
sysconfdir = '/etc'
localstatedir = '/var'
bash_completion = dependency('bash-completion', required : get_option('build-bash-completion'))