#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2009-2010 Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for Read
#
# 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_PYTHON_SYSTEM = pycentral
DEB_SUGAR_BRANCHES = 0.86 0.88

# workaround for broken DEB_SUGAR_BRANCHES expansion in cdbs <= 0.4.75
DEB_PYTHON_SUGAR_PACKAGES = sugar-read-activity-0.86

include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/python-sugar.mk
include /usr/share/cdbs/1/rules/debhelper.mk

DEB_UPSTREAM_PACKAGE = Read
DEB_UPSTREAM_URL = http://download.sugarlabs.org/sources/sucrose/fructose/$(DEB_UPSTREAM_PACKAGE)
DEB_UPSTREAM_TARBALL_EXTENSION = tar.bz2
DEB_UPSTREAM_TARBALL_MD5 = 56149150047f350a09047eccc7f420de

# Needed (always/seldom) at runtime
#  Python libs only recommended are tied to optional epubview support
CDBS_DEPENDS = $(call cdbs_sugar_anybranchdeps,python-sugar-toolkit, python-sugar)
CDBS_DEPENDS += , python-gobject, python-gtk2, python-dbus, python-cjson, python-evince, python-gconf, python-telepathy
CDBS_RECOMMENDS = ttf-dejavu-core
CDBS_RECOMMENDS += , python-lxml, python-cairo, python-beautifulsoup, python-webkit

# Ensure only one variant is installed at a time (Debian Policy 7.6.2)
CDBS_PROVIDES = $(DEB_SUGAR_SOURCE_PKGBASE)
CDBS_CONFLICTS = $(DEB_SUGAR_SOURCE_PKGBASE)
CDBS_REPLACES = $(DEB_SUGAR_SOURCE_PKGBASE)
