Add makefile and openrc init
This commit is contained in:
parent
31f27c5092
commit
273d02f4e1
3 changed files with 62 additions and 0 deletions
34
Makefile
Normal file
34
Makefile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
.POSIX:
|
||||
|
||||
PREFIX ?= /usr
|
||||
GO ?= go
|
||||
GOFLAGS ?= -buildvcs=false
|
||||
RM ?= rm -f
|
||||
|
||||
all: donation-notification
|
||||
|
||||
donation-notification:
|
||||
$(GO) build $(GOFLAGS) .
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp -f donation-notification $(DESTDIR)$(PREFIX)/bin
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/donation-notification
|
||||
|
||||
uninstall:
|
||||
$(RM) $(DESTDIR)$(PREFIX)/bin/donation-notification
|
||||
|
||||
clean:
|
||||
$(RM) donation-notification
|
||||
|
||||
run:
|
||||
go run -race .
|
||||
|
||||
watch:
|
||||
fd -e go -e tmpl | entr -rcs "go run . -config config.toml"
|
||||
|
||||
lint:
|
||||
fd -e go | entr -c golangci-lint run
|
||||
|
||||
.PHONY: all donation-notification install uninstall clean run watch lint
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue