#! /usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/class/gnome.mk
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk

CFLAGS := -Wall -g

# Ensure at build time that the library has no dependencies on undefined
# symbols.
LDFLAGS += -Wl,-z,defs

# Speed up loading.
LDFLAGS += -Wl,-O1

# "upstream" version number (no Debian package revision)
DEB_NOREVISION_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -f 1 -d '-')

# build static stuff:
DEB_CONFIGURE_EXTRA_FLAGS := --enable-gtk-doc --enable-static

# Make tight shlib dependencies?
#SHLIB_VERSION=$(DEB_NOREVISION_VERSION)
# No, specify the oldest version with which this version is still (supposed
# to be) compatible explicitly.
SHLIB_VERSION=1.9.0

# Specify shlib dependency information explicitly
DEB_DH_MAKESHLIBS_ARGS_libatk1.0-0 := -V"libatk1.0-0 (>= $(SHLIB_VERSION))"

DEB_DH_STRIP_ARGS := --keep-debug

# Yes, this is a hack, but dh_strip --dbg-package creates a libatk1.0-0-dbg
# and we don't want to change libatk1.0-dbg name for the moment.
binary-fixup/libatk1.0-dbg::
	mv debian/libatk1.0-0/usr/lib/debug/ debian/libatk1.0-dbg/usr/lib/
