#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@  --with autoreconf

override_dh_auto_configure:
	# by default engine and provider are created
	pwd
	dh_auto_configure -- --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)/engines-1.1 --with-provider-libica-full

override_dh_auto_build:
	dh_auto_build
	src/engine/ibmca-engine-opensslconfig
	src/provider/ibmca-provider-opensslconfig

override_dh_auto_install:
	dh_auto_install
	find debian -name '*.la' -delete
	# remove the provider 'so' from the engine folder:
	rm -f ./debian/openssl-ibmca/usr/lib/s390x-linux-gnu/engines-1.1/ibmca-provider.so
	# since it needs to be installed to /usr/lib/s390x-linux-gnu/ossl-modules - this is done in openssl-ibmca.install

override_dh_auto_test:
	dh_auto_test
