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

CORE_ABIVERSION := $(shell sed -rn 's/^\#define[[:space:]]+CORE_ABIVERSION[[:space:]]+//p' /usr/include/compiz/compiz-core.h )

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --disable-protobuf \
	--disable-static --libdir=/usr/lib

override_dh_install:
# remove unneeded .la files
	find $(CURDIR)/debian/tmp -type f -name '*.la' -print0 | xargs -0 rm -f
	dh_install --fail-missing

override_dh_makeshlibs:
	dh_makeshlibs -plibcompizconfig0 -V'libcompizconfig0 (>= 0.8.14-0~)'

override_dh_gencontrol:
	dh_gencontrol -- -Vcoreabiversion=$(CORE_ABIVERSION)
