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

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DISTRO = "$(shell lsb_release -si)"

# GTK3 migration
CFLAGS+=-DGTK_DISABLE_SINGLE_INCLUDES
CFLAGS+=-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
CFLAGS+=-DGSEAL_ENABLE
CFLAGS+=-DGDK_PIXBUF_DISABLE_DEPRECATED
CFLAGS+=-DG_DISABLE_DEPRECATED

LDFLAGS+=-Wl,-z,defs -Wl,--as-needed

configure_flags += --enable-man

%:
	dh --with autoreconf $@

override_dh_auto_configure:
	dh_auto_configure -- $(configure_flags)

override_dh_install:
	dh_install
	#Install apport hook only on Ubuntu
ifeq ($(DISTRO),"Ubuntu")
	dh_install debian/apport/source_lxrandr.py usr/share/apport/package-hooks
endif

override_dh_strip:
	dh_strip --dbg-package=lxrandr-dbg
