#!/usr/bin/make -f

# Exclude libraries that pull in ALSA or OpenGL which are not needed in normal operation
EXCLUDE_LIBS = \
	--exclude=avplugin \
	--exclude=fxavcodecplugin \
	--exclude=libjsoundalsa.so \
	$(NULL)

%:
	dh $@

override_dh_compress:
	dh_compress $(shell find oracle-java8-jdk-i386/man/ -type f ! -name '*.gz' -printf 'usr/lib/jvm//%p\n')

override_dh_shlibdeps:
	dh_shlibdeps $(EXCLUDE_LIBS) -l$(shell find oracle-java8-jdk-i386 -type f -name '*.so*' -printf 'usr/lib/jvm//%h\n' | sort -u | tr '\n' ':' | sed 's/:$$//')

override_dh_strip_nondeterminism:
	# Disable dh_strip_nondeterminism to speed up the build

# Exclude libraries that pull in ALSA or OpenGL which are not needed in normal operation
#EXCLUDE_LIBS = \
#	--exclude=avplugin \
#	--exclude=fxavcodecplugin \
#	--exclude=libjsoundalsa.so \
#	$(NULL)
#
#%:
#	dh $@
#
##override_dh_compress:
#	dh_compress $(shell find oracle-java8-jre-i386/man/ -type f ! -name '*.gz' -printf 'usr/lib/jvm//%p\n')
#
#override_dh_shlibdeps:
#	dh_shlibdeps $(EXCLUDE_LIBS) -l$(shell find oracle-java8-jre-i386 -type f -name '*.so*' -printf 'usr/lib/jvm//%h\n' | sort -u | tr '\n' ':' | sed 's/:$$//')
#
#override_dh_strip_nondeterminism:
#	# Disable dh_strip_nondeterminism to speed up the build
