X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Makefile;h=1af39a34cd43ba8672b2309b29b0139d650921a4;hb=eaa04753094d944c3513de9d4de85fb1eb2e8b7b;hp=8ce4906ea200fb958f3ceda1a19006f65d498dbe;hpb=ae1f18a06039ea2e9fae5a2729cf674f155f6139;p=deb_pkgs%2Fautorandr.git diff --git a/Makefile b/Makefile index 8ce4906..1af39a3 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,11 @@ install_systemd: ifneq ($(PREFIX),/usr/) sed -i -re 's#/usr/bin/autorandr#$(subst #,\#,${PREFIX})/bin/autorandr#g' ${DESTDIR}/${SYSTEMD_UNIT_DIR}/autorandr.service endif + @echo + @echo "To activate the systemd unit, run this command as root:" + @echo " systemctl daemon-reload" + @echo " systemctl enable autorandr.service" + @echo uninstall_systemd: $(if $(SYSTEMD_UNIT_DIR),,$(error SYSTEMD_UNIT_DIR is not defined)) @@ -106,13 +111,11 @@ endif install_udev: $(if $(UDEV_RULES_DIR),,$(error UDEV_RULES_DIR is not defined)) mkdir -p ${DESTDIR}/${UDEV_RULES_DIR}/ - echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="$(if $(findstring systemd, $(TARGETS)),/bin/systemctl start autorandr.service,${PREFIX}/bin/autorandr --batch --change --default default)"' > ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules -ifeq (${USER},root) - udevadm control --reload-rules -else - @echo "Please run this command as root:" + 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:" @echo " udevadm control --reload-rules" -endif + @echo uninstall_udev: $(if $(UDEV_RULES_DIR),,$(error UDEV_RULES_DIR is not defined))