#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright 2009-2010, Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for morituri
#
# 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
DEB_PYTHON_SYSTEM = pycentral
DEB_PYTHON_PACKAGES = morituri
include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/python-autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk

DEB_UPSTREAM_URL = http://thomas.apestaart.org/download/$(DEB_UPSTREAM_PACKAGE)
DEB_UPSTREAM_TARBALL_EXTENSION = tar.bz2
DEB_UPSTREAM_TARBALL_MD5 = c201e8d14a7b809503ac1a767722daee

DEB_MAKE_CHECK_TARGET = check

# Apparently upstream doesn't always cleanup properly
clean::
	find -name *.pyc -exec rm '{}' ';'

# Needed by upstream build process
CDBS_BUILD_DEPENDS += , python-epydoc, pychecker, python-twisted-core

# Needed both to build and at runtime
#  * gstreamer0.10-plugins-good due to profiles flac, wav, wavpack and vorbis
common-depends = python-gst0.10, python-gtk2, python-gobject, python-gst0.10, gstreamer0.10-plugins-good
CDBS_DEPENDS = $(common-depends)
CDBS_BUILD_DEPENDS += , $(common-depends)

# Needed (always/often/sometimes) at runtime
#  * gstreamer0.10-ffmpeg due to profile alac
#  * gstreamer0.10-lame due to profiles mp3 and mp3vbr
# TODO: recommend (not suggest) python-pycdio when packaged
CDBS_DEPENDS += , python, python-musicbrainz2, cdparanoia, cdrdao
CDBS_RECOMMENDS = gstreamer0.10-ffmpeg
CDBS_SUGGESTS += , gstreamer0.10-lame, python-pycdio
