debian swirl logo

Back to the packages list python-visual

#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2005-2009 Jonas Smedegaard 
# Description: Main Debian packaging script for python-visual
#
# 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

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/patchsys-quilt.mk
include debian/cdbs/1/class/python-autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include debian/cdbs/1/rules/buildinfo.mk

mainpkg = python-visual

DEB_UPSTREAM_URL = http://www.vpython.org/contents/download
DEB_UPSTREAM_PACKAGE = visual
DEB_UPSTREAM_TARBALL_BASENAME_MANGLE = s/~rc/_candidate/;/_/||s/-([\d.]+)/\-$$1_release/
DEB_UPSTREAM_TARBALL_EXTENSION = tar.bz2
DEB_UPSTREAM_TARBALL_MD5 = 8661841d7d71d4a84d01e28581b8f9fe

DEB_CONFIGURE_EXTRA_FLAGS = --disable-docs --with-example-dir="/usr/share/doc/$(mainpkg)/examples"
#DEB_INSTALL_EXAMPLES_$(mainpkg) = examples/*.py
DEB_COMPRESS_EXCLUDE = .py

# build-related and deprecated README
DEB_INSTALL_DOCS_ALL = 
DEB_INSTALL_DOCS_ALL += authors.txt

# Use unversioned Boost libs if possible
boostver = 1.39

# Drop development files
install/$(mainpkg)::
		find debian/$(mainpkg)/usr -regex '.*\.la' -exec rm '{}' ';'

# Install vpython only as example
binary-post-install/$(mainpkg)::
		mv debian/$(mainpkg)/usr/bin/vpython debian/$(mainpkg)/usr/share/doc/$(mainpkg)/examples/
		rm -r debian/$(mainpkg)/usr/bin

# Avoid extra license
binary-post-install/$(mainpkg)::
		rm -f debian/$(mainpkg)/usr/share/doc/$(mainpkg)/html/license.txt

# Needed both by upstream build (or test) process and at runtime
CDBS_DEPENDS := python-numpy
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), $(CDBS_DEPENDS)

# Needed by upstream build process
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), libgtkglextmm-x11-1.2-dev (>= 1.2), libglibmm-2.4-dev, libpangomm-1.4-dev, libglademm-2.4-dev, libpango1.0-dev, libfreetype6-dev
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), libboost-python$(boostver)-dev, libboost-signals$(boostver)-dev, libboost-thread$(boostver)-dev
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), libglu1-mesa-dev | xlibmesa-glu-dev | libglu-dev

# Needed (seldom) at runtime
#  idle needed in example vpython script
CDBS_SUGGESTS = idle

# Resolve, cleanup and apply CDBS-declared dependencies
include debian/cdbs/1/rules/package-relations.mk

Builds:

python-visual
vpython 3d scientific visualization library