#!/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