Files
hjem/Makefile
2026-06-23 14:07:17 -04:00

27 lines
414 B
Makefile

GO ?= go
.PHONY: build lint install uninstall install-openrc uninstall-openrc
all: build
build:
$(GO) build -o hjem
lint:
$(GO) vet ./...
$(GO) fmt ./...
install:
cp hjem /usr/local/bin
uninstall:
$(RM) /usr/local/bin/hjem
install-openrc:
cp hjem.initd /etc/init.d/hjem
user="$${SUDO_USER:-$${DOAS_USER}}"; \
echo "command_user=$$user" >> /etc/init.d/hjem
uninstall-openrc:
$(RM) /etc/init.d/hjem