- install -m 775 autorandr /usr/bin/
- install -m 775 autorandr_monitor /usr/bin/
- install -m 644 bash_completion/autorandr /etc/bash_completion.d/
- ln -sf /usr/bin/autorandr /usr/bin/auto-disper
- install -m 644 Xsession.d/autorandr /etc/X11/Xsession.d/99zautorandr
- #install -m 644 pm-utils/40autorandr /etc/pm/power.d/
+ install -D -m 755 autorandr.py ${DESTDIR}${INSTALL_PATH}/autorandr
+ install -D -m 644 bash_completion/autorandr ${DESTDIR}/etc/bash_completion.d/autorandr
+
+hotplug:
+ install -D -m 755 pm-utils/40autorandr ${DESTDIR}/etc/pm/sleep.d/40autorandr
+ install -D -m 644 udev/40-monitor-hotplug.rules ${DESTDIR}/etc/udev/rules.d/40-monitor-hotplug.rules
+ifeq (${USER},root)
+ udevadm control --reload-rules
+else
+ @echo "Please run this command as root:"
+ @echo " udevadm control --reload-rules"
+endif