-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (40 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
NAME=cronlocker
VERSION=0.9.0
ARCH=amd64
LICENSE="BSD 2-Clause License"
MAINTAINER="Tobias Schoknecht <[email protected]>"
DESCRIPTION="Distributed sequential cronjob running tool."
HOMEPAGE="https://www.viafintech.com/"
GIT="[email protected]:viafintech/cronlocker.git"
GITBROWSER="https://github.com/viafintech/cronlocker"
.PHONY: test testci package cronlocker
all: cronlocker
test:
go test -v `go list ./...|grep -v vendor`
testci:
go test -v `go list ./...|grep -v vendor` -tags=docker
cronlocker: *.go */*.go
go build -ldflags="-s -w" .
install: cronlocker
install -d $(DESTDIR)/usr/bin
install cronlocker $(DESTDIR)/usr/bin/cronlocker
DESTDIR=tmp
package: install cronlocker
install -d $(DESTDIR)/usr/share/doc/$(NAME)
install --mode=644 package/copyright $(DESTDIR)/usr/share/doc/$(NAME)/copyright
fpm -s dir -t deb -n $(NAME) -v $(VERSION) -C $(DESTDIR) \
-p $(NAME)_$(VERSION)_$(ARCH).deb \
--license $(LICENSE) \
--maintainer $(MAINTAINER) \
--vendor $(MAINTAINER) \
--description $(DESCRIPTION) \
--url $(HOMEPAGE) \
--deb-field 'Vcs-Git: $(GIT)' \
--deb-field 'Vcs-Browser: $(GITBROWSER)' \
--deb-upstream-changelog package/changelog \
--deb-no-default-config-files \
usr/bin usr/share/doc/
clean:
rm -f cronlocker
rm -f cronlocker*.deb
rm -fr $(DESTDIR)