- Move entry point to cmd/streamdeck-lets-go/ - Split package main into internal packages: - internal/deck: hardware control (Deck, events, brightness) - internal/render: key rendering, icons, fonts, PageManager - internal/web: HTTP API + embedded SPA - internal/daemon: event loop, autoswitch, screensaver, actions - Add ConfigDir() to internal/config - Export cross-package API (Deck, PageManager, WebServer, etc.) - Move dist/arch/ → packaging/ with updated PKGBUILD/.SRCINFO - Add Makefile (build, test, vet, fmt, install) - Update README with new build commands and project structure - Delete unused media.go stub
34 lines
740 B
Makefile
34 lines
740 B
Makefile
BINARY := streamdeck-lets-go
|
|
MODULE := streamdeck-lets-go
|
|
CMDDIR := cmd/streamdeck-lets-go
|
|
PKGARCH := packaging
|
|
|
|
.PHONY: all build test vet fmt clean install
|
|
|
|
all: build
|
|
|
|
build:
|
|
CGO_ENABLED=1 go build -ldflags "-s -w" -o $(BINARY) ./$(CMDDIR)
|
|
|
|
test:
|
|
go test ./...
|
|
|
|
vet:
|
|
go vet ./...
|
|
|
|
fmt:
|
|
gofmt -l .
|
|
|
|
clean:
|
|
rm -f $(BINARY)
|
|
|
|
install: build
|
|
install -Dm755 $(BINARY) /usr/local/bin/$(BINARY)
|
|
install -Dm644 $(PKGARCH)/streamdeck-lets-go.service /usr/lib/systemd/user/streamdeck-lets-go.service
|
|
install -Dm644 $(PKGARCH)/90-streamdeck.rules /usr/lib/udev/rules.d/90-streamdeck.rules
|
|
|
|
uninstall:
|
|
rm -f /usr/local/bin/$(BINARY)
|
|
rm -f /usr/lib/systemd/user/streamdeck-lets-go.service
|
|
rm -f /usr/lib/udev/rules.d/90-streamdeck.rules
|