build: PKGBUILD for ArchLinux
[reset-trackpoint-fix.git] / Makefile
1 ### https://git.thekondor.net/?p=reset-trackpoint-fix.git (mirror: github.com/thekondor/reset-trackpoint-fix)
2
3 .PHONY: help
4 help: ## Show (this) help
5         @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
6
7 .PHONY: install
8 install: ## Install files
9         @test -f ${DESTDIR}/etc/reset-trackpoint-fix.conf || install -Dm644 reset-trackpoint-fix.conf ${DESTDIR}/etc/reset-trackpoint-fix.conf
10         @install -Dm755 reset-trackpoint-fix.sh ${DESTDIR}/usr/bin/reset-trackpoint-fix.sh
11         @install -Dm644 reset-trackpoint-fix.service ${DESTDIR}/etc/systemd/system/reset-trackpoint-fix.service
12
13 .PHONY: uninstall
14 uninstall: disable ## Remove installed files
15         @rm ${DESTDIR}/usr/bin/reset-trackpoint-fix.sh
16         @rm ${DESTDIR}/etc/systemd/system/reset-trackpoint-fix.service
17
18 .PHONY: enable
19 enable: ## Enable a service file to trigger resets
20         systemctl enable ${DESTDIR}/etc/systemd/system/reset-trackpoint-fix.service
21
22 .PHONY: disable
23 disable: ## Disable a service file
24         systemctl disable reset-trackpoint-fix.service