#!/usr/bin/make -f

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

DEB_DH_MAKESHLIBS_ARGS_ALL := -V'libaspell15 (>= 0.60)'

DEB_DH_INSTALL_SOURCEDIR := debian/tmp
DEB_INSTALL_CHANGELOGS_ALL := manual/aspell.html/ChangeLog.html
DEB_CONFIGURE_EXTRA_FLAGS := --enable-pkgdatadir=/usr/lib/aspell --enable-pkglibdir=/usr/lib/aspell

install/aspell::
	install -m644 debian/aspell.compat debian/aspell/usr/share/aspell/
	install -D -m644 debian/aspell.lintian debian/aspell/usr/share/lintian/overrides/aspell

binary-install/libaspell15::
# The spell and ispell compatibility scripts don't belong in
# /usr/lib/aspell, dammit.
	rm -f debian/libaspell15/usr/lib/aspell/spell \
	      debian/libaspell15/usr/lib/aspell/ispell

# Hack to fix dpatch-edit-patch
unpatch: deapply-dpatches
