#!/usr/bin/make -f
#-*- makefile -*-

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/gnome.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/gnome-pkg-tools/1/rules/gnome-version.mk
include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

DEB_CONFIGURE_EXTRA_FLAGS += \
	--enable-vala=yes \
	--disable-run-in-source-tree \
	--disable-vegas-plugin

DEB_DH_STRIP_ARGS := --dbg-package=xplayer-dbg
DEB_DH_MAKESHLIBS_ARGS += -Xplugins/
DEB_DH_GIREPOSITORY_ARGS += -lsrc
DEB_DH_MAKESHLIBS_ARGS_libxplayer0 += -V'libxplayer0 (>= $(DEB_VERSION)), libxplayer0 (<< $(DEB_GNOME_NEXTVERSION))'
DEB_DH_INSTALL_ARGS += --fail-missing -Xlibxplayer.a -Xlibxplayer.la

binary-install/xplayer::
	dh_python2 -pxplayer /usr/lib/xplayer/xplayer
binary-install/xplayer-plugins::
	dh_python2 -pxplayer-plugins /usr/lib/xplayer/plugins
binary-install/xplayer-plugins-extra::
	dh_python2 -pxplayer-plugins-extra /usr/lib/xplayer/plugins

common-binary-predeb-arch::
	find debian -name *.a -exec rm '{}' \;
	find debian -name *.la -exec rm '{}' \;
