File debian.rules of Package bouncycastle-pg

#!/usr/bin/make -f

JAVA_HOME=/usr/lib/jvm/default-java

VERSION=1.58

INST_ROOT=${CURDIR}/debian/${NAME}
JAR_DIR=/usr/share/java
JAR_NAME=bcpg-${VERSION}.jar
JAR_SHORT=bcpg.jar

%:
	dh $@ --with javahelper

override_dh_auto_clean:
	# Leave empty to avoid a FTBFS

override_dh_auto_build:
	mkdir build
	find -name *java | grep -v /test/ > files.lst
	javac -encoding utf8 -d build -cp /usr/share/java/bcprov.jar @files.lst
	jar cf ${JAR_NAME} -C build .

# add a symlink from javacsv.jar to csv.jar
override_jh_installlibs:
	jh_installlibs
	dh_installdocs LICENSE.html CONTRIBUTORS.html
	dh_install ${JAR_NAME} ${JAR_DIR}
	dh_link ${JAR_DIR}/${JAR_NAME} ${JAR_DIR}/${JAR_SHORT}

get-orig-source:
	uscan --force-download --download-current-version --repack --compression xz