X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Makefile;h=f1d27253cad3700472dd6121a8ec197a3470cd39;hb=c3521b34b01e51bbd798de3a6841bef0632557d8;hp=4d871ad2b4d5843c2eb1a5d1084b717f6a81fb75;hpb=74a310b76da7dbff1735387fecf4b1ba5f3f6cde;p=deb_pkgs%2Fautorandr.git diff --git a/Makefile b/Makefile index 4d871ad..f1d2725 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,19 @@ +all: + @echo "Call \"make install\" to install this program." + @echo "Call \"make hotplug\" to install matching hotplug events." +INSTALL_PATH=/usr/local/bin install: - install auto-disper /usr/bin/ - install -m 774 autorandr /usr/bin/ - install -m 774 autorandr_monitor /usr/bin/ - install -m 644 bash_completion/autorandr /etc/bash_completion.d/ - #install -m pm-utils/40autorandr /etc/pm/power.d/ + install -D auto-disper ${DESTDIR}${INSTALL_PATH}/auto-disper + install -D -m 755 autorandr ${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