#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2008-2010 Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for Browse
#
# 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

# Suppress unneeded auto-resolved build-dependency on python-dev
CDBS_BUILD_DEPENDS_class_python-sugar_python = python$(cdbs_python_nondefault_version)

# workaround for broken DEB_SUGAR_BRANCHES expansion in cdbs <= 0.4.75
DEB_PYTHON_SUGAR_PACKAGES = sugar-browse-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 = Browse
DEB_UPSTREAM_URL = http://download.sugarlabs.org/sources/sucrose/fructose/$(DEB_UPSTREAM_PACKAGE)
DEB_UPSTREAM_TARBALL_EXTENSION = tar.bz2
DEB_UPSTREAM_TARBALL_MD5 = c9a93fad156c56a5ec0b9c61b9ce8822

# Needed (always/seldom) at runtime
#  python-rsvg fallbacks unneeded since python-rsvg 2.24.0-2: can be dropped after Squeeze+1
CDBS_DEPENDS = $(call cdbs_sugar_anybranchdeps,python-sugar python-sugar-toolkit python-carquinyol)
CDBS_DEPENDS += , python-rsvg | python-gnome2-desktop (<= 2.24.0-1), python-rsvg | librsvg2-common
CDBS_DEPENDS += , python-gobject, python-gtk2, python-dbus, python-cjson, python-xpcom, python-hulahop, python-cairo
CDBS_RECOMMENDS = $(call cdbs_sugar_anybranchdeps,sugar sugar-artwork)

# 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)

# Transitional quirk: sugar-web-activity renamed to sugar-browse-activity
# (unneeded since Squeeze: can be dropped after Squeeze+1)
CDBS_PROVIDES += , sugar-web-activity
CDBS_CONFLICTS += , sugar-web-activity
CDBS_REPLACES += , sugar-web-activity
