#!/usr/bin/make -f

DESTDIR = $(CURDIR)/debian/inkscape
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

CFLAGS += -Wall
CXXFLAGS += -Wall

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  CFLAGS += -O0
  CXXFLAGS += -O0
else
  CFLAGS += -O2
  CXXFLAGS += -O2
endif

%:
	dh $@ --buildsystem=autoconf --parallel --with autotools_dev,python2

override_dh_auto_configure:
	dh_auto_configure \
		--buildsystem=autoconf -- \
		--with-gnome-vfs \
		--enable-lcms

override_dh_install:
	install -D -o root -g root -m 644 $(CURDIR)/debian/inkscape.bash \
		$(DESTDIR)/etc/bash_completion.d/inkscape
	dh_install
	dh_translations
