44 lines
1.0 KiB
Makefile
44 lines
1.0 KiB
Makefile
VERSION = $(shell git describe --tags)
|
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
|
|
|
all: build
|
|
./powerpaneld --hostname=breen
|
|
# su -c "setcap 'cap_net_bind_service=+ep' go.wit.com"
|
|
|
|
build:
|
|
GO111MODULE=off go build \
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
verbose:
|
|
GO111MODULE=off go build -v -x \
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
install:
|
|
GO111MODULE=off go install \
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
run: build
|
|
-systemctl stop powerpaneld.service
|
|
./powerpaneld
|
|
|
|
goimports:
|
|
goimports -w *.go
|
|
|
|
redomod:
|
|
rm -f go.*
|
|
GO111MODULE= go mod init
|
|
GO111MODULE= go mod tidy
|
|
|
|
log:
|
|
@journalctl -f -xeu powerpaneld.service
|
|
|
|
enable:
|
|
systemctl enable powerpaneld.service
|
|
|
|
package-build:
|
|
go-deb --no-gui --repo go.wit.com/apps/powerpaneld
|
|
|
|
package-info:
|
|
dpkg-deb -I /home/jcarr/incoming/powerpaneld*
|
|
dpkg-deb -c /home/jcarr/incoming/powerpaneld*
|