1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Portions Copyright © 2008-2010 Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for sugar-physics-activity
#
# 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
DEB_PYTHON_SUGAR_PACKAGES = sugar-physics-activity
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
# We support all branches, but default to 0.88.
CDBS_DEPENDS = python-sugar-0.88 | python-sugar, python-sugar-toolkit-0.88 | python-sugar-toolkit
CDBS_DEPENDS += , python-hippocanvas, python-telepathy, python-gtk2, python-cjson
# Suppress unneeded auto-resolved build-dependency on python-dev
CDBS_BUILD_DEPENDS_class_python-sugar_python = python$(cdbs_python_nondefault_version)
# We need libs for our Physics magic. Libs removed from the orig tarball.
CDBS_DEPENDS += , python-elements, python-box2d, python-pkg-resources
# Pygame is the box2d backend we use.
CDBS_DEPENDS += , python-pygame
# Override sugar listing
CDBS_BUILD_DEPENDS_class_python-sugar_sugar = python-sugar-0.88 | python-sugar, python-sugar-toolkit-0.88 | python-sugar-toolkit, unzip
DEBIAN_DIR := $(shell echo ${MAKEFILE_LIST} | awk '{print $$1}' | xargs dirname )
UPSTREAM_VERSION ?=$(shell uscan --dehs | sed -n 's/.*<upstream-version>\(.*\)<\/upstream-version>.*/\1/p')
PACKAGE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
CURRENT_VERSION ?=$(shell dpkg-parsechangelog | sed -n 's/^Version: \(.*\)+dfsg.*/\1/p')
get-orig-source:
cd ${DEBIAN_DIR}/.. && uscan --force-download --upstream-version $(CURRENT_VERSION)
tar xf ../Physics-${UPSTREAM_VERSION}.tar.bz2
rm -rf ${CURDIR}/Physics-${UPSTREAM_VERSION}/lib
tar cf ${CURDIR}/${DEB_SOURCE_PACKAGE}_${UPSTREAM_VERSION}+dfsg.orig.tar Physics-${UPSTREAM_VERSION}/
bzip2 ${CURDIR}/${DEB_SOURCE_PACKAGE}_${UPSTREAM_VERSION}+dfsg.orig.tar
clean::
find -name *.mo -delete
find -name *.linfo -delete
rm -rf Physics-${UPSTREAM_VERSION}
install/sugar-physics-activity::
rm -f debian/sugar-physics-activity/usr/share/sugar/activities/Physics.activity/COPYING
rm -f debian/sugar-physics-activity/usr/share/sugar/activities/Physics.activity/olpcgames/copying
find debian/sugar-physics-activity/usr/share/sugar/activities/Physics.activity/ -type f -print0 | xargs -0 chmod a-x
|