#!/usr/bin/make -f

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --with-moduledir="\$${prefix}/lib/lcmaps"

override_dh_makeshlibs:
	dh_makeshlibs -n

override_dh_install:
	rm debian/lcmaps-plugins-voms/usr/lib/lcmaps/lib*.a
	rm debian/lcmaps-plugins-voms/usr/lib/lcmaps/lib*.la
	rm -rf debian/lcmaps-plugins-voms/usr/share/doc/lcmaps-plugins-voms-*
	dh_install

override_dh_gencontrol:
	dh_gencontrol -- \
	  -Vlib:Depends="$(shell dpkg-query -W -f '$${Depends}' liblcmaps-dev \
			| sed -E 's/.*(liblcmaps[[:digit:]][[:alnum:].-]+).*/\1/') (>= 1.5.0)"
