#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/class/gnome.mk
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
include /usr/share/gnome-pkg-tools/1/rules/gnome-version.mk
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

# this relies on the fact that the first package is the shared library to
# retrieve the package name (with SONAME)
libgnomeuiN := $(shell sed -rn 's/^Package:[[:space:]]*(libgnomeui-[[:digit:]]+)[[:space:]]*$$/\1/p' debian/control)
# the debug package should be named libgnomeui-dbg (unversionned); please
# change it next time the package has to go through NEW
DEBUG_PKG := libgnomeui-0-dbg

LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed

DEB_DH_STRIP_ARGS += --dbg-package=$(DEBUG_PKG)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
			     --libexecdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)/$(libgnomeuiN)

