-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
33 lines (25 loc) · 1.17 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
VERSION=$(shell git describe --tags|tr -d 'v')
LDFLAGS=-ldflags "-X main.version=${VERSION}"
default: pkg_all
build_all:
go get -v ./...
GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o ./release/ian.amd64.Darwin ./cmd/ian
GOOS=linux GOARCH=arm go build ${LDFLAGS} -o ./release/ian.armhf.Linux ./cmd/ian
GOOS=linux GOARCH=arm GOARM=6 go build ${LDFLAGS} -o ./release/ian.armel.Linux ./cmd/ian
GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o ./release/ian.amd64.Linux ./cmd/ian
GOOS=linux GOARCH=386 go build ${LDFLAGS} -o ./release/ian.i386.Linux ./cmd/ian
clean:
rm -fr dpkg/pkg/*
rm -fr release
pkg_all: clean build_all
DEBUG=1 IAN_DIR=dpkg ./release/ian.amd64.Linux set -v ${VERSION}
DEBUG=1 IAN_DIR=dpkg ./release/ian.amd64.Linux set -a i386
cp ./release/ian.i386.Linux dpkg/usr/bin/ian
DEBUG=1 IAN_DIR=dpkg ./release/ian.amd64.Linux pkg
DEBUG=1 IAN_DIR=dpkg ./release/ian.amd64.Linux set -a armhf
cp ./release/ian.armhf.Linux dpkg/usr/bin/ian
DEBUG=1 IAN_DIR=dpkg ./release/ian.amd64.Linux pkg
DEBUG=1 IAN_DIR=dpkg ./release/ian.amd64.Linux set -a amd64
cp ./release/ian.amd64.Linux dpkg/usr/bin/ian
DEBUG=1 IAN_DIR=dpkg ./release/ian.amd64.Linux pkg
cp dpkg/pkg/* release