#!/usr/bin/make -f

DEB_DH_STRIP_ARGS := --dbg-package=shishi-dbg

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_DH_MAKESHLIBS_ARGS_libshishi0 = -V'libshishi0 (>= $(DEB_UPSTREAM_VERSION))'
DEB_DH_MAKESHLIBS_ARGS_libshisa0 = -V'libshisa0 (>= $(DEB_UPSTREAM_VERSION))'
DEB_DH_MAKESHLIBS_ARGS_libshishi0 = -- -c4
DEB_DH_MAKESHLIBS_ARGS_libshisa0 = -- -c4

DEB_CONFIGURE_USER_FLAGS = --with-db-dir=/var/lib/shishi
DEB_CONFIGURE_EXTRA_FLAGS = --with-packager=Debian --with-packager-version=$(DEB_VERSION) --with-packager-bug-reports=http://bugs.debian.org/ \
	--enable-gtk-doc

ifneq ($(cdbs_crossbuild),)
DEB_CONFIGURE_EXTRA_FLAGS = --with-libgcrypt-prefix=/usr/$(DEB_HOST_GNU_TYPE)
endif

DEB_MAKE_CHECK_TARGET = check

DEB_COMPRESS_EXCLUDE := shishi.pdf

# Build manual.
common-install-prehook-indep:: common-install-prehook-impl
	cd doc && $(MAKE) install-ps install-pdf install-html DESTDIR=$(DEB_DESTDIR)
