#!/usr/bin/make -f
# -*- makefile -*-
#export DH_VERBOSE=1

AS_CONFIGURE_ARGS = --enable-dep11

# Define install target dir
INSTALLDIR = $(CURDIR)/debian/tmp

%:
	dh $@ #--with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- $(AS_CONFIGURE_ARGS)

override_dh_auto_install:
	dh_auto_install --destdir=$(INSTALLDIR)

	rm -f $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/*.a
	rm -f $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/*.la

	# We don't ship the builder parts in Debian (yet)
	# Will probably be included at a later stage for 3rd-parties (we don't use it in Debian)
	rm -f  $(INSTALLDIR)/usr/bin/appstream-builder
	rm -rf $(INSTALLDIR)/usr/include/libappstream-builder
	rm -f  $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/libappstream-builder*
	rm -rf $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/asb-plugins
	rm -f  $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/appstream-builder.pc
	rm -f  $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/girepository-1.0/AppStreamBuilder*
	rm -f  $(INSTALLDIR)/usr/share/gir-1.0/AppStreamBuilder*
	rm -f  $(INSTALLDIR)/usr/share/man/man1/appstream-builder*

override_dh_auto_test:
	# Don't run tests, they are always failing at time (20140924)

override_dh_install:
	dh_install --list-missing
