+ifeq ($(USE_DBUS), true)
+install-dbus-policy:
+ $(INSTALL) -d $(DESTDIR)$(dbusdir)
+ $(INSTALL_DATA) etc/dbus-1/system.d/udev_sysbus_policy.conf $(DESTDIR)$(dbusdir)
+
+uninstall-dbus-policy:
+ - rm $(DESTDIR)$(dbusdir)/udev_sysbus_policy.conf
+else
+install-dbus-policy:
+ -
+uninstall-dbus-policy:
+ -
+endif
+
+install-initscript: etc/init.d/udev etc/init.d/udev.debian etc/init.d/udev.init.LSB
+ @if [ -f /etc/redhat-release ]; then \
+ $(INSTALL_DATA) -D etc/init.d/udev $(DESTDIR)$(initdir)/udev; \
+ elif [ -f /etc/SuSE-release ]; then \
+ $(INSTALL_DATA) -D etc/init.d/udev.init.LSB $(DESTDIR)$(initdir)/udev; \
+ elif [ -f /etc/debian_version ]; then \
+ $(INSTALL_DATA) -D etc/init.d/udev.debian $(DESTDIR)$(initdir)/udev; \
+ fi
+
+install-config: $(GEN_CONFIGS)
+ $(INSTALL) -d $(DESTDIR)$(configdir)
+ @if [ ! -r $(DESTDIR)$(configdir)udev.conf ]; then \
+ echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.conf $(DESTDIR)$(configdir); \
+ $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.conf $(DESTDIR)$(configdir); \
+ fi
+ @if [ ! -r $(DESTDIR)$(configdir)udev.rules ]; then \
+ echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.rules $(DESTDIR)$(configdir); \
+ $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.rules $(DESTDIR)$(configdir); \
+ fi
+ @if [ ! -r $(DESTDIR)$(configdir)udev.permissions ]; then \
+ echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.permissions $(DESTDIR)$(configdir); \
+ $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.permissions $(DESTDIR)$(configdir); \
+ fi
+
+install: install-initscript install-config install-dbus-policy all
+ $(INSTALL) -d $(DESTDIR)$(udevdir)
+ $(INSTALL) -d $(DESTDIR)$(hotplugdir)
+ $(INSTALL_PROGRAM) -D $(ROOT) $(DESTDIR)$(sbindir)/$(ROOT)
+ $(INSTALL_PROGRAM) -D $(DAEMON) $(DESTDIR)$(sbindir)/$(DAEMON)
+ $(INSTALL_PROGRAM) -D $(SENDER) $(DESTDIR)$(sbindir)/$(SENDER)
+ $(INSTALL_PROGRAM) -D $(INFO) $(DESTDIR)$(usrbindir)/$(INFO)
+ $(INSTALL_PROGRAM) -D $(TESTER) $(DESTDIR)$(sbindir)/$(TESTER)
+ $(INSTALL_PROGRAM) -D $(STARTER) $(DESTDIR)$(sbindir)/$(STARTER)
+ $(INSTALL_DATA) -D udev.8 $(DESTDIR)$(mandir)/man8/udev.8
+ $(INSTALL_DATA) -D udevinfo.8 $(DESTDIR)$(mandir)/man8/udevinfo.8
+ $(INSTALL_DATA) -D udevstart.8 $(DESTDIR)$(mandir)/man8/udevstart.8
+ $(INSTALL_DATA) -D udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8
+ - ln -f -s udevd.8 $(DESTDIR)$(mandir)/man8/udevsend.8
+ - ln -f -s $(sbindir)/$(SENDER) $(DESTDIR)$(hotplugdir)/$(ROOT).hotplug
+ifndef DESTDIR
+ - killall udevd
+ - rm -f $(udevdir)/.udev.tdb
+endif
+ @extras="$(EXTRAS)" ; for target in $$extras ; do \
+ echo $$target ; \
+ $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
+ -C $$target $@ ; \
+ done ; \
+
+uninstall: uninstall-dbus-policy
+ - rm $(hotplugdir)/udev.hotplug
+ - rm $(configdir)/udev.permissions
+ - rm $(configdir)/udev.rules
+ - rm $(configdir)/udev.conf
+ - rm $(initdir)/udev
+ - rm $(mandir)/man8/udev.8
+ - rm $(mandir)/man8/udevinfo.8
+ - rm $(sbindir)/$(ROOT)
+ - rm $(sbindir)/$(DAEMON)
+ - rm $(sbindir)/$(SENDER)
+ - rm $(usrbindir)/$(INFO)
+ - rmdir $(hotplugdir)
+ - rmdir $(configdir)
+ - rm $(udevdir)/.udev.tdb
+ - rmdir $(udevdir)
+ @extras="$(EXTRAS)" ; for target in $$extras ; do \
+ echo $$target ; \
+ $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
+ -C $$target $@ ; \
+ done ; \