diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/Makefile.am | 2 | ||||
-rwxr-xr-x | util/install_helper.sh | 32 | ||||
-rw-r--r-- | util/meson.build | 27 |
3 files changed, 60 insertions, 1 deletions
diff --git a/util/Makefile.am b/util/Makefile.am index 756afea..1eb2ec3 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -23,7 +23,7 @@ install-exec-hook: mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true; \ fi -EXTRA_DIST = udev.rules init_script +EXTRA_DIST = udev.rules init_script meson.build install_helper.sh MOUNT_FUSE_PATH = @MOUNT_FUSE_PATH@ UDEV_RULES_PATH = @UDEV_RULES_PATH@ diff --git a/util/install_helper.sh b/util/install_helper.sh new file mode 100755 index 0000000..fe65c1c --- /dev/null +++ b/util/install_helper.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Don't call this script. It is used internally by the Meson +# build system. Thank you for your cooperation. +# + +set -e + +sysconfdir="$1" +bindir="$2" +prefix="${MESON_INSTALL_DESTDIR_PREFIX}" + +chown root:root "${prefix}/${bindir}/fusermount3" +chmod u+s "${prefix}/${bindir}/fusermount3" + +if test ! -e "${DESTDIR}/dev/fuse"; then + mkdir -p "${DESTDIR}/dev" + mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229 +fi + +install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \ + "${prefix}/lib/udev/rules.d/99-fuse3.rules" + +install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \ + "${prefix}/${sysconfdir}/init.d/fuse3" + +if test -x /usr/sbin/update-rc.d; then + # May fail for a DESTDIR installation + /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true +fi + + diff --git a/util/meson.build b/util/meson.build new file mode 100644 index 0000000..43c4973 --- /dev/null +++ b/util/meson.build @@ -0,0 +1,27 @@ +# Attention, emacs, please use -*- mode: python -*- +# (even though this isn't actually Python code) + +# we re-use mount_util.c from the library, but do want to keep ourself +# as stand-alone as possible. in order to make an out-of-source build +# possible, we "generate" the file from its original location by +# copying it over. +mount_util_c = custom_target('mount_util', + input : '../lib/mount_util.c', + output : 'mount_util.c', + command : ['cp', '-a', '@INPUT@', '@OUTPUT@'], +) + +executable('fusermount3', ['fusermount.c', mount_util_c], + include_directories: include_dirs, + install: true, + install_dir: get_option('bindir')) + +executable('mount.fuse3', ['mount.fuse.c'], + include_directories: include_dirs, + install: true, + install_dir: get_option('sbindir')) + +meson.add_install_script('install_helper.sh', get_option('sysconfdir'), + get_option('bindir'), get_option('libdir')) + + |