#!/usr/bin/make -f

DISTRIB_VERSION_MAJOR := $(shell lsb_release -s -r | cut -d '.' -f 1)
DISTRIB_VERSION_MINOR := $(shell lsb_release -s -r | cut -d '.' -f 2)

ifeq (1,$(shell test "$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)" -ge "1104" && echo "1"))
	CFLAGS += -std=gnu++0x
endif

export CFLAGS

%:
	dh $@ --with xul-ext,apport

override_dh_auto_build:
	make -f Makefile.xulrunner

override_dh_auto_install:
	install-xpi src/mozvoikko.xpi

override_dh_auto_clean:
	make -f Makefile.xulrunner clean
