#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS+=$(CPPFLAGS) -D_POSIX_C_SOURCE=200809L
CXXFLAGS+=$(CPPFLAGS) -D_POSIX_C_SOURCE=200809L

%:
	dh $@ --with cmake,python3 --no-parallel

override_dh_auto_configure:
	dh_auto_configure -- \
	-DROOT_PREFIX=$(CURDIR)/debian/tmp \
	-Denable-gnome-integration=ON \
	-Denable-old-gnome-integration=OFF \
	-Denable-kde-integration=ON \
	-Denable-xfce-integration=ON \
	-Denable-global-menu=OFF \
	-DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH)

override_dh_install:
	rm -fr $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/__pycache__
	dh_install
