summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2024-01-20 09:36:23 +0100
committerEddy Pedroni <epedroni@pm.me>2024-01-20 09:36:23 +0100
commit7df31aef7d84c32e88c12805e325626409902cd8 (patch)
tree521787174edfd230fc1ae48fa4883c4a3563f5a0 /Makefile
parent16da39271c76b903a80f313e3f7663bbd17afac7 (diff)
Rename rules file, add Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e858a74
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,14 @@
+UDEV_RULE_DIR := /etc/udev/rules.d
+RULES_FILE := 50-docking-station.rules
+
+$(UDEV_RULE_DIR)/$(RULES_FILE): $(RULES_FILE)
+ @echo "Installing udev rules (requires root access)"
+ sudo install --owner=root --group=root --mode=644 -t $(UDEV_RULE_DIR) $(RULES_FILE)
+
+install: $(UDEV_RULE_DIR)/$(RULES_FILE)
+
+uninstall:
+ @echo "Removing udev rules (requires root access)"
+ sudo rm "$(UDEV_RULE_DIR)/$(RULES_FILE)"
+
+.PHONY: install uninstall