- install -D -m 644 contrib/udev/40-monitor-hotplug.rules ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules
-ifeq (${USER},root)
- udevadm control --reload-rules
-else
- @echo "Please run this command as root:"
+ mkdir -p ${DESTDIR}/${UDEV_RULES_DIR}/
+ echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="$(if $(findstring systemd, $(TARGETS)),/bin/systemctl start --no-block autorandr.service,${PREFIX}/bin/autorandr --batch --change --default default)"' > ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules
+ @echo
+ @echo "To activate the udev rules, run this command as root:"