X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Makefile;h=4141b1c1ab07e8ccd9b5012536a8178fda5079e4;hb=89bf1ac166e2c124c2b0bd687138b8fddbe74c47;hp=41494faedfabc0773b4351c90f7ff7e8377b26fd;hpb=399523da9b1ce32e798ea940224be595cf052972;p=deb_pkgs%2Fautorandr.git diff --git a/Makefile b/Makefile index 41494fa..4141b1c 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,15 @@ all: INSTALL_PATH=/usr/local/bin install: - install auto-disper ${INSTALL_PATH} - install -m 755 autorandr ${INSTALL_PATH} - install -m 644 bash_completion/autorandr /etc/bash_completion.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 -m 755 pm-utils/40autorandr /etc/pm/sleep.d/ - install -m 644 udev/40-monitor-hotplug.rules /etc/udev/rules.d/ - udevadm control --reload-rules \ No newline at end of file + 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