-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
27 lines (22 loc) · 846 Bytes
/
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
# Package variables
URL := "https://github.com/maxmouchet/goasn"
NAME := goasn
LICENSE := MIT
VERSION := $(shell git describe --abbrev=0 --tags | tr -d 'v')
MAINTAINER := "<max@maxmouchet.com>"
DESCRIPTION := "Fast offline lookup of IP addresses to IXP and AS numbers from RIB archives."
FPMFLAGS := --description ${DESCRIPTION} --license ${LICENSE} --maintainer ${MAINTAINER} --url ${URL} -n ${NAME} -v ${VERSION}
.PHONY: all
all: goasn
.PHONY: clean
clean:
rm -f goasn goasn.exe *.deb *.rpm *.pkg
.PHONY: release
release:
$(info VERSION = ${VERSION})
GOARCH=amd64 GOOS=linux go build -o goasn main.go
fpm -s dir -t deb -f --prefix /usr/bin ${FPMFLAGS} goasn
fpm -s dir -t rpm -f --prefix /usr/bin ${FPMFLAGS} goasn
GOARCH=amd64 GOOS=windows go build -o goasn.exe main.go
goasn: $(shell find . -name '*.go')
go build -o goasn main.go