[Buildroot] [git commit branch/2019.02.x] package/libfuse: only install udev rules if (e)udev is enabled

Peter Korsgaard peter at korsgaard.com
Fri Apr 5 20:32:46 UTC 2019


commit: https://git.buildroot.net/buildroot/commit/?id=d09d5a8411cdff5d9dba00f3cff10037ce1ae653
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2019.02.x

No point in installing udev rules if nothing will use it.

Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
(cherry picked from commit 4cba22bbfa21ac27d28cfb7e9973c2c91e30568f)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/libfuse/libfuse.mk | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/package/libfuse/libfuse.mk b/package/libfuse/libfuse.mk
index 84027ebedb..ab0131b057 100644
--- a/package/libfuse/libfuse.mk
+++ b/package/libfuse/libfuse.mk
@@ -17,11 +17,18 @@ LIBFUSE_CONF_OPTS = \
 	--enable-util \
 	UDEV_RULES_PATH=/lib/udev/rules.d
 
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+define LIBFUSE_INSTALL_UDEV
+	mkdir -p $(TARGET_DIR)/lib/udev/rules.d
+	cp $(STAGING_DIR)/lib/udev/rules.d/*-fuse.rules $(TARGET_DIR)/lib/udev/rules.d
+endef
+
+LIBFUSE_POST_INSTALL_TARGET_HOOKS += LIBFUSE_INSTALL_UDEV
+endif
+
 define LIBFUSE_INSTALL_TARGET_CMDS
 	cp -dpf $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/
 	cp -dpf $(STAGING_DIR)/usr/lib/libfuse.so* $(TARGET_DIR)/usr/lib/
-	mkdir -p $(TARGET_DIR)/lib/udev/rules.d
-	cp $(STAGING_DIR)/lib/udev/rules.d/*-fuse.rules $(TARGET_DIR)/lib/udev/rules.d
 endef
 
 define LIBFUSE_DEVICES


More information about the buildroot mailing list