Debian packaging updates

Signed-off-by: pcdummy <pcdummy@ThinkPad-T410.pcdummy.lan>
master
René Jochum 4 years ago
parent 904fbd948f
commit b415e62c69

8
.gitignore vendored

@ -1,2 +1,8 @@
lql_api
_build
lql-api
.pc
debian/debhelper-build-stamp
debian/lql-api.debhelper.log
debian/lql-api
debian/.debhelper

@ -1,6 +1,6 @@
# This how we want to name the binary output
BINARY=lql_api
BINARY := lql-api
SHELL := /bin/bash
TAG_COMMIT := $(shell git rev-list --abbrev-commit --tags --max-count=1)
TAG := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true)
@ -19,15 +19,24 @@ ifneq ($(shell git status --porcelain),)
endif
# Setup the -ldflags option for go build here, interpolate the variable values
LDFLAGS=-ldflags "-w -s -X github.com/webmeisterei/lql_api/version.Version=${VERSION}"
LDFLAGS=-ldflags '-w -s -X github.com/webmeisterei/lql_api/version.Version=${VERSION}'
LDFLAGS_STATIC=-ldflags '-extldflags "-static" -w -s -X github.com/webmeisterei/lql_api/version.Version=${VERSION}'
# Builds the project
build:
go build ${LDFLAGS} -o ${BINARY}
go build -o ${BINARY} -a ${LDFLAGS}
# Builds the project
build_static:
CGO_ENABLED=0 GOOS=linux go build -o ${BINARY} -a ${LDFLAGS_STATIC}
# Installs our project: copies binaries
install:
go install ${LDFLAGS_f1}
go install ${LDFLAGS}
.PHONY: debian
debian:
GOPROXY= dpkg-buildpackage -us -uc
# Cleans our project: deletes binaries
clean:

@ -3,10 +3,11 @@ Description=LQL API Server
After=network.target
[Service]
EnvironmentFile=/etc/lql-api/%i
Type=simple
User=%i
Group=%i
ExecStart=/usr/local/bin/lql_api localserver %i --listen localhost:8080 -d
ExecStart=/usr/bin/lql-api localserver %i --listen $LISTEN $DEBUG
[Install]
WantedBy=multi-user.target

2
debian/rules vendored

@ -5,4 +5,4 @@
override_dh_auto_install:
dh_auto_install -- --no-source
dh_installsystemd no-start
dh_installsystemd --no-start -- lql-api@.service

Loading…
Cancel
Save