description: 'Where to install udev rules (if empty, query pkg-config(1))')
option('utils', type : 'boolean', value : true,
- description: 'Wheter or not to build and install helper programs')
+ description: 'Whether or not to build and install helper programs')
option('examples', type : 'boolean', value : true,
- description: 'Wheter or not to build example programs')
\ No newline at end of file
+ description: 'Whether or not to build example programs')
+
+option('useroot', type : 'boolean', value : true,
+ description: 'Set owner and setuid bits on installed files')
+
sysconfdir="$1"
bindir="$2"
udevrulesdir="$3"
+useroot="$4"
# Both sysconfdir and bindir are absolute paths (since they are joined
# with --prefix in meson.build), but need to be interpreted relative
DESTDIR="${DESTDIR%/}"
fi
-chown root:root "${DESTDIR}${bindir}/fusermount3"
-chmod u+s "${DESTDIR}${bindir}/fusermount3"
-
install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
"${DESTDIR}${sysconfdir}/fuse.conf"
+if $useroot; then
+ chown root:root "${DESTDIR}${bindir}/fusermount3"
+ chmod u+s "${DESTDIR}${bindir}/fusermount3"
-if test ! -e "${DESTDIR}/dev/fuse"; then
- mkdir -p "${DESTDIR}/dev"
- mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
+ if test ! -e "${DESTDIR}/dev/fuse"; then
+ mkdir -p "${DESTDIR}/dev"
+ mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
+ fi
fi
install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
meson.add_install_script('install_helper.sh',
join_paths(get_option('prefix'), get_option('sysconfdir')),
join_paths(get_option('prefix'), get_option('bindir')),
- udevrulesdir)
+ udevrulesdir,
+ '@0@'.format(get_option('useroot')))