Ubuntu Pastebin

Paste from teward at Tue, 8 Dec 2015 23:25:47 +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
35
36
37
38
39
#!/usr/bin/make -f

# These rules are for the packages:
#
# DAEMON - Placeholder for the actual build rules.

# 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:
	# Trident version
	export DAEMON_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

	########################################
	# PACKAGE
	mkdir -p debian/PACKAGE/usr/sbin/
	go build -ldflags "-X main.Version ${DAEMON_VERSION}" -o debian/PACKAGE/usr/sbin/daemon src/cmd/daemon/daemon.go
	go build -ldflags "-X main.Version ${DAEMON_VERSION}" -o debian/PACKAGE/usr/sbin/daemonsetup src/cmd/daemonsetup/daemonsetup.go

override_dh_installinit:
	dh_installinit --name "PACKAGE"


.PHONY: override_dh_auto_install override_dh_installinit
Download as text