Ubuntu Pastebin

Paste from Thomas Ward at Thu, 31 Dec 2015 20:34:04 +0000

Download as text
 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# Where we store our GOPATH
export GOPATH=$(shell pwd)/ext/_gopath/

%:
	dh $@ --parallel --with systemd 

override_dh_auto_install:
	# Package version
	export PACKAGE_VERSION=`git describe --tags`

	# Avoid weird permissions inside sbuild
	umask 0022

	# Force a clean GOPATH/src
	rm -rf ${GOPATH}/src/ || true

	# Install dependencies
	doc/deps.sh

	# Partially stripped down here, but this is effectively what's done with each binary built
	mkdir -p debian/PACKAGE/usr/sbin/
	go build -ldflags "-X main.Version ${PACKAGE_VERSION}" -o debian/PACKAGE/usr/sbin/PACKAGEdaemon src/cmd/PACKAGEdaemon/PACKAGEdaemon.go
	go build -ldflags "-X main.Version ${PACKAGE_VERSION}" -o debian/PACKAGE/usr/sbin//PACKAGEsetup src/cmd/PACKAGEsetup/PACKAGEsetup.go

override_dh_installinit:
	dh_installinit --name "PACKAGE"


.PHONY: override_dh_auto_install override_dh_installinit
Download as text