#!/usr/bin/make -f

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

include /usr/share/cdbs/1/class/ant.mk
include /usr/share/cdbs/1/rules/debhelper.mk

# Which distribution is this?
DIST_CODE := $(shell lsb_release -sc)

# On Redhat and SuSE start scripts are not automatically added to system start. This is wanted behavior and standard. Do the same for Debian.
ifeq "$(DIST_CODE)" "jessie"
  DEB_DH_SYSTEMD_START_ARGS := --no-start
  DEB_DH_INSTALLINIT_ARGS := -n -o
else
  DEB_DH_INSTALLINIT_ARGS := --no-start
endif

JAVA_HOME := $(shell readlink -f /usr/bin/javac | sed 's:/bin/javac$$::')
DEB_ANT_ARGS := -DdestDir=$(DEB_DESTDIR) -DpackageName=$(DEB_SOURCE_PACKAGE)
DEB_ANT_BUILDFILE := build/build.xml
DEB_ANT_INSTALL_TARGET := build
