#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2009 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.

DEB_BUILDDIR = build
DEB_PYTHON_SYSTEM = pycentral
ifneq (,$(DEB_MAINTAINER_MODE))
  # Enable stuff not policy compliant (eg. unsuitable for build daemons)
  DEB_COPYRIGHT_CHECK_STRICT = yes
  DEB_AUTO_UPDATE_DEBIAN_CONTROL = yes
endif
include debian/cdbs/1/rules/upstream-tarball.mk
include debian/cdbs/1/rules/copyright-check.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include debian/cdbs/1/class/python-autotools.mk
include debian/cdbs/1/rules/buildinfo.mk

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

# Needed by upstream build process
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), libabiword-2.8-dev (>= 2.8.1-1.0), python-gtk2-dev

# workaround for missing build-dependencies of libabiword-2.8-dev
CDBS_BUILD_DEPENDS := $(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, libgucharmap2-dev, libcairo-dev, libpango1.0-dev, libgtk2.0-dev (>= 2.12.0), librsvg2-dev (>= 2.16.0)

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

# Merge duplicate build-dependencies
include debian/cdbs/1/rules/package-relations.mk
