#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2009-2010 Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for pyabiword
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

DEB_BUILDDIR = build
include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/class/python-autotools.mk

DEB_DH_AUTORECONF_ARGS = autoreconf -- -vfi -I.

DEB_UPSTREAM_URL = http://www.abisource.com/downloads/pyabiword/$(DEB_UPSTREAM_VERSION)
DEB_UPSTREAM_TARBALL_MD5 = 826ea3e4cdcdd11906ce8739d07e6c26

DEB_INSTALL_EXAMPLES_python-abiword = examples/*

# Needed by upstream build process
CDBS_BUILD_DEPENDS += , dh-autoreconf, libabiword-2.9-dev (>= 2.9.0), python-gtk2-dev

# workaround for missing build-dependencies of libabiword-2.8-dev
CDBS_BUILD_DEPENDS += , libfribidi-dev (>= 0.10.4), libglib2.0-dev (>= 2.6.0), libgsf-1-dev (>= 1.12), libwv-dev (>= 1.2.0), libenchant-dev (>= 1.2.0), libgoffice-0.8-dev, libcairo-dev, libpango1.0-dev, libgtk2.0-dev (>= 2.12.0), librsvg2-dev (>= 2.16.0)

# Avoid .la files - see http://wiki.debian.org/ReleaseGoals/LAFileRemoval
common-binary-post-install-arch::
	find '$(cdbs_curdestdir)' -name '*.la' -delete

# force-clean builddir (cleanup bug in multiflavor routine?)
clean::
	rm -rf $(DEB_BUILDDIR)
