#!/usr/bin/make -f
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

GS_CONFIGURE_FLAGS = --libdir=/usr/lib \
		--disable-silent-rules

ifeq ($(DEB_HOST_ARCH_OS), linux)
	# Enable fwupd support on supported architectures
	ifneq (,$(findstring $(DEB_BUILD_ARCH), amd64 arm64 armhf i386))
		GS_CONFIGURE_FLAGS += --enable-firmware
	endif
endif

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

%:
	dh $@ --with gnome,autoreconf

override_dh_auto_configure:
	dh_auto_configure -- $(GS_CONFIGURE_FLAGS)

override_dh_auto_install:
	dh_auto_install --destdir=$(INSTALLDIR)
	rm -f $(INSTALLDIR)/usr/lib/gs-plugins-?/libgs_plugin_fedora*

override_dh_install:
	dh_install -X.a -X.la --list-missing

override_dh_makeshlibs:
	dh_makeshlibs -Xlibgs_plugin

override_dh_auto_test:
