--- sugar-pippy-activity-25.orig/debian/control.in +++ sugar-pippy-activity-25/debian/control.in @@ -0,0 +1,32 @@ +Source: sugar-pippy-activity +Section: x11 +Priority: optional +Maintainer: Debian OLPC +Uploaders: Jonas Smedegaard +Build-Depends: @cdbs@ +Standards-Version: 3.7.3 +Vcs-Git: git://git.debian.org/git/collab-maint/sugar-pippy-activity.git +Vcs-Browser: http://git.debian.org/?p=collab-maint/sugar-pippy-activity.git;a=summary +Homepage: http://wiki.laptop.org/go/Sugar +XS-Python-Version: all + +Package: sugar-pippy-activity +Architecture: all +Depends: ${shlibs:Depends}, ${python:Depends}, python-gobject, python-gtk2, python-vte, python-telepathy, python-pygame, python-gtksourceview2, python-sugar, python-sugar-toolkit, sugar-presence-service +Recommends: sugar, python-olpc-datastore, python-gst0.10 +Suggests: python-tamtam-data +Provides: ${python:Provides} +XB-Python-Version: ${python:Versions} +Description: pippy activity for the Sugar graphical shell + Sugar is a graphical user interface aimed at children. + . + Sugar is mainly used as the interface for One Laptop Per Child (OLPC) + XO machines. + . + This package contains the pippy activity, teaching Python programming + by providing access to Python code samples and a fully interactive + Python interpreter. + . + The user can type and execute simple Python expressions. For example, + it would be possible for a user to write Python statements to calculate + expressions, play sounds, or make simple text animation. --- sugar-pippy-activity-25.orig/debian/rules +++ sugar-pippy-activity-25/debian/rules @@ -0,0 +1,24 @@ +#!/usr/bin/make -f +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2008 Jonas Smedegaard + +# NB! Local CDBS tweaks in use. More info in README.cdbs-tweaks +DEB_PYTHON_SYSTEM = pycentral +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-sugar.mk +include debian/cdbs/1/rules/buildinfo.mk + +DEB_UPSTREAM_PACKAGE = Pippy +DEB_UPSTREAM_URL = http://dev.laptop.org/pub/sugar/sources/pippy-activity +DEB_UPSTREAM_TARBALL_EXTENSION = tar.bz2 +DEB_UPSTREAM_TARBALL_MD5 = 47908eec91c6183eb7b0225f2e47dd88 + +# Resolve, cleanup and apply CDBS-declared dependencies +include debian/cdbs/1/rules/package-relations.mk --- sugar-pippy-activity-25.orig/debian/pycompat +++ sugar-pippy-activity-25/debian/pycompat @@ -0,0 +1 @@ +2 --- sugar-pippy-activity-25.orig/debian/copyright +++ sugar-pippy-activity-25/debian/copyright @@ -0,0 +1,25 @@ +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=189 +Upstream-Name: Pippy +Upstream-Maintainer: sugar@lists.laptop.org + irc://irc.freenode.net/sugar +Upstream-Source: http://dev.laptop.org/pub/sugar/sources/pippy-activity/ + git://dev.laptop.org/projects/pippy-activity + +Files: * +Copyright: 2007, Chris Ball +License: GPL-2+ + +Files: debian/* +Copyright: 2008 Jonas Smedegaard +License: GPL-2+ + +Files: library/pippy/query.py +Copyright: 2007, One Laptop Per Child +License: GPL-2+ + +Files: ./setup.py +Copyright: 2006, Red Hat, Inc. +License: GPL-2+ + +On Debian systems, the complete text of the GNU General Public License +can be found in file /usr/share/common-licenses/GPL. --- sugar-pippy-activity-25.orig/debian/copyright_hints +++ sugar-pippy-activity-25/debian/copyright_hints @@ -0,0 +1,122 @@ +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=XXX +Upstream-Name: Untrusted draft - double-check copyrights yourself! + +Files: po/Pippy.pot + po/af.po + po/am.po + po/ar.po + po/ay.po + po/bg.po + po/bn.po + po/bn_IN.po + po/ca.po + po/de.po + po/dz.po + po/el.po + po/en.po + po/fa.po + po/fa_AF.po + po/ff.po + po/gu.po + po/ha.po + po/hi.po + po/ht.po + po/ig.po + po/is.po + po/it.po + po/ja.po + po/km.po + po/ko.po + po/mk.po + po/ml.po + po/mn.po + po/mr.po + po/mvo.po + po/nb.po + po/ne.po + po/nl.po + po/pa.po + po/pap.po + po/pis.po + po/pl.po + po/ps.po + po/pseudo.po + po/pt.po + po/pt_BR.po + po/qu.po + po/ro.po + po/ru.po + po/rw.po + po/sd.po + po/si.po + po/sl.po + po/te.po + po/th.po + po/tpi.po + po/tr.po + po/ur.po + po/vi.po + po/yo.po + po/zh_CN.po + po/zh_TW.po +Copyright: YEAR THE PACKAGE'S HOLDER +License: UNKNOWN + +Files: MANIFEST + NEWS + activity.py + activity/activity-default.svg + activity/activity-icon.svg + activity/activity.info + data/graphics/bounce + data/graphics/camera + data/graphics/jump + data/graphics/lines + data/graphics/pong + data/graphics/slideshow + data/graphics/snow + data/graphics/tree + data/math/fibonacci + data/math/guess + data/math/pascal + data/math/sierpinski + data/math/times + data/python/function + data/python/if + data/python/interpreter + data/python/recursion + data/sound/getSoundList + data/sound/playSine + data/sound/playWave + data/sound/sequence + data/string/hello + data/string/thanks + library/pippy/__init__.py + library/pippy/console.py + library/pippy/game.py + library/pippy/sound.py +Copyright: *No copyright* +License: UNKNOWN + +Files: po/en_US.po + po/es.po +Copyright: 2007, THE PACKAGE'S HOLDER +License: UNKNOWN + +Files: setup.py +Copyright: 2006, Red Hat, Inc +License: GPL-2+ + +Files: pippy_app.py +Copyright: 2007, Chris Ball, based on Collabora's "hellomesh" demo +License: GPL-2+ + +Files: library/pippy/query.py +Copyright: 2007, One Laptop Per Child +License: GPL-2+ + +Files: po/fr.po +Copyright: vers le presse-papier" + YEAR THE PACKAGE'S HOLDER +License: UNKNOWN + --- sugar-pippy-activity-25.orig/debian/compat +++ sugar-pippy-activity-25/debian/compat @@ -0,0 +1 @@ +6 --- sugar-pippy-activity-25.orig/debian/control +++ sugar-pippy-activity-25/debian/control @@ -0,0 +1,32 @@ +Source: sugar-pippy-activity +Section: x11 +Priority: optional +Maintainer: Debian OLPC +Uploaders: Jonas Smedegaard +Build-Depends: cdbs (>= 0.4.39), devscripts (>= 2.10.7), quilt, patchutils (>= 0.2.25), debhelper (>= 5.0.44), python-sugar, python-sugar-toolkit (>= 0.81.4-2~), unzip, python-dev (>= 2.3.5-11), python-central (>= 0.5.6), dh-buildinfo +Standards-Version: 3.7.3 +Vcs-Git: git://git.debian.org/git/collab-maint/sugar-pippy-activity.git +Vcs-Browser: http://git.debian.org/?p=collab-maint/sugar-pippy-activity.git;a=summary +Homepage: http://wiki.laptop.org/go/Sugar +XS-Python-Version: all + +Package: sugar-pippy-activity +Architecture: all +Depends: ${shlibs:Depends}, ${python:Depends}, python-gobject, python-gtk2, python-vte, python-telepathy, python-pygame, python-gtksourceview2, python-sugar, python-sugar-toolkit, sugar-presence-service +Recommends: sugar, python-olpc-datastore, python-gst0.10 +Suggests: python-tamtam-data +Provides: ${python:Provides} +XB-Python-Version: ${python:Versions} +Description: pippy activity for the Sugar graphical shell + Sugar is a graphical user interface aimed at children. + . + Sugar is mainly used as the interface for One Laptop Per Child (OLPC) + XO machines. + . + This package contains the pippy activity, teaching Python programming + by providing access to Python code samples and a fully interactive + Python interpreter. + . + The user can type and execute simple Python expressions. For example, + it would be possible for a user to write Python statements to calculate + expressions, play sounds, or make simple text animation. --- sugar-pippy-activity-25.orig/debian/README.cdbs-tweaks +++ sugar-pippy-activity-25/debian/README.cdbs-tweaks @@ -0,0 +1,128 @@ +CDBS tweak +========== + +CDBS is great. In some corner cases, however, some parts of CDBS +sometimes needs a few tweaks to work optimally. + +This is a collection of such tweaks. The goal is for these tweaks to be +absorbed into upstream CDBS. We just haven't found time yet to discuss +them at the CDBS developers' mailinglist. And possible we do not all +agree that the tweaks are so great - therefore this "staging area". + +If you found this file below debian/ subdir in a source package, most +probably only a subset of the below mentioned tweaks are relevant and +have been shipped with the package. The repository of all these tweaks +is here: svn://svn.debian.org/build-common/people/js/overlay/ + +Web access: http://svn.debian.org/wsvn/build-common/people/js/overlay/ + + + +New buildinfo rule +------------------ + +See package description for "buildinfo" for more info. + + + +Improved support for multiple compilations +------------------------------------------ + +Create and clean builddir _after_ resolving per-package DEB_BUILDDIR. + +Honour per-package DEB_BUILDDIR in makefile and autotools classes. + +Support multiple build flavors in makefile and autotools classes. + + + +Various improvements to python-distutils class +---------------------------------------------- + +Use full path to Python interpreter (Python Policy section 1.3.2). + +Add CDBS_BUILD_DEPENDS to old policy method. + +Fix CDBS_BUILD_DEPENDS in new policy methods to only depend on debhelper +when actually used. + +Fix DEB_PYTHON_SIMPLE_PACKAGES sometimes installed twice (and only one +of them honouring DEB_PYTHON_COMPILE_VERSION). + +Unify install path using new DEB_PYTHON_DESTDIR. + +Quote install path. + + + +New python-autotools class +-------------------------- + +Handle autotools-based Python packaging. + + + +New python-sugar class +---------------------- + +Handle packaging of Sugar activities. + + + +New perl-build class +-------------------- + +Handle Perl modules using Module::Build. + + + +New copyright-check rule +------------------------ + +Refuse to build if the source is found to contain different copyright +info than earlier builds. + + + +New kernelpatches rule +---------------------- + +Small wrapper around dh-kpatches, taking care of build-dependencies too. + + + +New package-relations rule +-------------------------- + +Improved build-dependency handling (merging multiple dependencies on +same packages), and add dependency handling for binary packages (to ease +maintaining identical build-dependencies and dependencies for eg. Perl +modules meeding runtime stuff for buildtime tests). + + + +New routines for handling upstream tarball +------------------------------------------ + +Rules and variables to help downloading, validating and repackaging +upstream tarball. + +Implements the rules print-version and get-orig-source commonly used +for group-maintained packages with Debian-specific patches maintained in +SVN or some other VCS, and automated fetching virgin upstream tarball +(possibly massaged after download e.g. to strip non-DFSG material). + + + +Support for custom BTS info +--------------------------- + +Include BTS control info found in debian/*.bts files, or alternatively +redirect bug reports to the email address defined in DEB_BTS_EMAIL. + + + +New dict class +-------------- + +Rules for packaging ispell, aspell, myspell and wordlist dictionaries. --- sugar-pippy-activity-25.orig/debian/README.packaging +++ sugar-pippy-activity-25/debian/README.packaging @@ -0,0 +1,126 @@ +Packaging hints +=============== + +This packaging is maintained with the use of Git, using the following +branches: + + upstream-git - master branch of upstream Git source + upstream - unpackaged upstream tarballs + pristine-tar - binary deltas to recreate pristine tarballs + master - Debian packaging + +With the above, we can switch between working from upstream released +tarballs and syncing directly with upstream development, both using +git-buildpackage (with its default branch names). + + +Package sugar-base as example +----------------------------- + +The rest of this document uses sugar-base as sample package, and some +old actual version numbers from that package - replace with your actual +package as needed... + + +Getting packaging source from Git repository +-------------------------------------------- + +The following commands (in an empty dir) fetch and build the package: + +aptitude install git-buildpackage +git clone git://git.debian.org/git/collab-maint/sugar-base +cd sugar-base +git fetch origin upstream:upstream +git-buildpackage + + +Merging with newer upstream Git tree +------------------------------------ + +The following commands (inside Git repository) updates the local mirror +of upstream source, and merges with our packaging branch: + +cd sugar-base +git checkout upstream-git +git pull +git fetch --tags +git checkout master +git pull . upstream-git + +The following command shows upstream changes possibly relevant to +mention in changelog (replace "HEAD^" with a reference to actual sync +commit if not invoked right after sync'ing): + +git log --pretty="format:%h %s" HEAD^..upstream-git + + +Doing a package release from upstream tarball +--------------------------------------------- + +The following command (inside Git repository) imports a downloaded +tarball into the "upstream" and pristine-tarball Git branches (taball +name is recorded too and used later, so make sure to first rename the +tarball to follow Debian naming convention {name}_{version}.orig.{ext}): + +git-import-orig --pristine-tar --sign-tags path/to/sugar-base_0.79.0.orig.tar.gz + +Check that all files are included in "upstream" branch (don't know why +this fails sometimes): + +git status + +If some files are "untracked", then do the following to manually add +untracked files to upstream branch and merge them with master branch +(the stash commands puts changelog update aside and restore it again +afterwards): + +git stash +git checkout upstream +git add * +git commit -m "Add files mysteriously skipped by git-import-orig." +git checkout master +git pull . upstream +git stash apply + +Comment out tarball hash in debian/control, test get-orig-source, and +enable hash line with new hash: + +fakeroot debian/rules get-orig-source + +Adjust changelog and package, and if satisfied with the result then tag +it, push Git sources and release the package: + +git-buildpackage --git-tag --git-sign-tags +[test package...] +git push --all +git push --tags +cd .. +dput sugar-base_0.79.0-1_amd64.changes + + +Doing a package release from upstream Git snapshot +-------------------------------------------------- + +First, look at upstream development for a good place to release, and tag +by its date, replacing "~" with ".". Normally just tag the latest +upstream commit, to avoid simply including later upstream work in the +debian diff: + +git log --abbrev-commit upstream-git +git tag -s -m "Tag upstream for package release." upstream/0.2.git20080130 61279f8 + +Adjust changelog and package, and if satisfied with the result then tag +it, push Git sources and release the package: + +dch -r -v "0.2~git20080130-0~0jones1" "New upstream Git snapshot." +debcommit -r -a +git-buildpackage +[test package...] +git tag -s -m "Tag package release." debian/0.2.git20080130-0.0jones1 +git push --all +git push --tags +cd .. +dput sugar-base_0.2~git20080130-0~0jones1_amd64.changes + + + -- Jonas Smedegaard Sat, 08 Mar 2008 01:08:36 +0100 --- sugar-pippy-activity-25.orig/debian/changelog +++ sugar-pippy-activity-25/debian/changelog @@ -0,0 +1,84 @@ +sugar-pippy-activity (25-1) unstable; urgency=low + + * New upstream release. + * Update cdbs snippets: + + Move dependency cleanup to new local snippet package-relations.mk. + + Update README.cdbs-tweaks. + * Update-copyright-check: PO files added (no new owners, copyrights or + licenses). + * Add DEB_MAINTAINER_MODE in debian/rules (thanks to Romain Beauxis). + + -- Jonas Smedegaard Sat, 16 Aug 2008 21:06:42 +0200 + +sugar-pippy-activity (22-1) unstable; urgency=medium + + * New upstream release. + + Properly Supports recent versions of gtksourceview. Closes: + bug#482120, thanks to C. Scott Ananian and others. + * Drop patch 1002, applied upstream now. + * Unfuzz patch 1001. + * Add watch file. + * Update debian/copyright: + + Add URL to upstream tarball source. + + Use exact URL for upstream Git source. + + Reorganize to only mention each license once. + * Update local cdbs snippets: + + Use upstream-tarball.mk to track upstream source releases. + + Adjust dependency cleanup (upstream-tarball.mk needs newer cdbs). + + Fix python-sugar.mk to work with recent python-sugar-toolkit where + MANIFEST files are ignored and an internal hardcoded exception + list is used instead. Tighten build-dependency. Drop use of (now + irrelevant) DEB_PYTHON_SUGAR_MANIFEST. + + Simplify build-dependency cleanup (1-revision fix no longer + needed). + + Restructure output of copyright-check.mk to match new proposed + copyright-format at + http://wiki.debian.org/Proposals/CopyrightFormat . + This closes: bug#487002, thanks to Lucas Nussbaum. + * Adjust debian/copyright to follow newest proposed draft of + http://wiki.debian.org/Proposals/CopyrightFormat . + * Semi-auto-update debian/control to update build-dependencies: + DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean + * Set urgency=medium to hopefully reach Lenny before freezing. + + -- Jonas Smedegaard Mon, 14 Jul 2008 18:10:20 +0200 + +sugar-pippy-activity (20~git.20080321-3) unstable; urgency=low + + * Update cdbs tweaks: + + Clean *.xo and locale in python-sugar.mk (based on initial work by + Santiago Ruano Rincón). + + Fix preserve upstream MANIFEST files only once in python-sugar.mk. + + Support multiple activity packages from one source in + python-sugar.mk. + + Update copyright-check cdbs snippet to store newline-delimited + hints and strip any non-printable characters. Update + copyright-hints. + + Drop wget options broken with recent versions of wget in + update-tarball.mk. + + Fix simultanously setting DEB_PYTHON_SUGAR_MANIFEST and + DEB_PYTHON_SUGAR_MANIFEST_REGEX in python-sugar.mk. + + Relax python-central and python-support build-dependencies in + python-sugar.mk. + + Tighten python-sugar.mk build-dependency on python-sugar-toolkit + to versions using full path, and properly installs zip-based + bundles (*.xo files). + * Bump debhelper compatibility level to version 6. + * Semi-auto-update debian/control to update build-dependencies: + DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean + + -- Jonas Smedegaard Sat, 26 Apr 2008 19:16:49 +0200 + +sugar-pippy-activity (20~git.20080321-2) unstable; urgency=low + + * Suggest (not recommend) sugar-tamtam: used for few examples, and is + not yet in Debian (so upsets ftpmasters, as fulfilling all + recommends is a release goal for Lenny). + + -- Jonas Smedegaard Thu, 03 Apr 2008 16:16:24 +0200 + +sugar-pippy-activity (20~git.20080321-1) unstable; urgency=low + + * Initial release. Closes: bug#444021. + + -- Jonas Smedegaard Sun, 23 Mar 2008 23:31:02 +0100 --- sugar-pippy-activity-25.orig/debian/watch +++ sugar-pippy-activity-25/debian/watch @@ -0,0 +1,3 @@ +# run the "uscan" command to check for upstream updates and more. +version=3 +http://dev.laptop.org/pub/sugar/sources/pippy-activity/Pippy-(.*)\.tar\.bz2 --- sugar-pippy-activity-25.orig/debian/cdbs/1/rules/package-relations.mk +++ sugar-pippy-activity-25/debian/cdbs/1/rules/package-relations.mk @@ -0,0 +1,50 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2004-2006 Jonas Smedegaard +# Description: Resolve, cleanup and apply package relationships +# +# 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. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_package_relations +_cdbs_rules_package_relations = 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +# Merge build-dependencies on same packages +# TODO: rewrite (in perl, probably) to be more generic +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.43)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\|0.4.27\|0.4.39\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.39)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\|0.4.27\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.27)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5.0.44)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\|5.0.37.2\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5.0.37.2)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.28)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.21)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.0)/ s/ *,* *\bdebhelper (>= \(4.1.60\)) *,* */, /g') + +# Cleanup superfluous commas +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e 's/ *,/,/g' -e 's/^ *, *//' -e 's/ *, *$$//') + +# Apply CDBS-declared dependencies to binary packages +$(patsubst %,binary-predeb/%,$(DEB_PACKAGES)) :: binary-predeb/%: + echo 'cdbs:Depends=$(CDBS_DEPENDS_ALL), $(or $(CDBS_DEPENDS_$(cdbs_curpkg)),$(CDBS_DEPENDS))' \ + | sed -e 's/ *,/,/g' -e 's/^ *, *//' -e 's/ *, *$$//' \ + >> debian/$(cdbs_curpkg).substvars + +endif --- sugar-pippy-activity-25.orig/debian/cdbs/1/rules/upstream-tarball.mk +++ sugar-pippy-activity-25/debian/cdbs/1/rules/upstream-tarball.mk @@ -0,0 +1,139 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2007-2008 Jonas Smedegaard +# Description: Convenience rules for dealing with upstream tarballs +# +# 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. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_upstream_tarball +_cdbs_rules_upstream_tarball := 1 + +include $(_cdbs_rules_path)/buildvars.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), cdbs (>= 0.4.39) + +# Prefix for upstream location of all upstream tarballs (mandatory!) +#DEB_UPSTREAM_URL = + +DEB_UPSTREAM_PACKAGE = $(DEB_SOURCE_PACKAGE) +DEB_UPSTREAM_TARBALL_VERSION = $(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_VERSION:$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG)=),$(DEB_UPSTREAM_VERSION)) +DEB_UPSTREAM_TARBALL_EXTENSION = tar.gz +# Checksum to ensure integrity of downloadeds using get-orig-source (optional) +#DEB_UPSTREAM_TARBALL_MD5 = + +DEB_UPSTREAM_WORKDIR = ../tarballs + +# Perl regexp to change locally used string into that in upstream URL and srcdir +#DEB_UPSTREAM_TARBALL_VERSION_MANGLE +cdbs_upstream_tarball_version_mangled = $(if $(strip $(DEB_UPSTREAM_TARBALL_VERSION_MANGLE)),$(shell echo '$(DEB_UPSTREAM_TARBALL_VERSION)' | perl -pe '$(DEB_UPSTREAM_TARBALL_VERSION_MANGLE)'),$(DEB_UPSTREAM_TARBALL_VERSION)) + +# Base filename (without extension) as used in upstream URL +DEB_UPSTREAM_TARBALL_BASENAME = $(DEB_UPSTREAM_PACKAGE)-$(cdbs_upstream_tarball_version_mangled) + +# Base directory within tarball +DEB_UPSTREAM_TARBALL_SRCDIR = $(DEB_UPSTREAM_PACKAGE)-$(cdbs_upstream_tarball_version_mangled) + +# Space-delimited list of directories and files to strip (optional) +#DEB_UPSTREAM_REPACKAGE_EXCLUDE = CVS .cvsignore doc/rfc*.txt doc/draft*.txt +DEB_UPSTREAM_REPACKAGE_TAG = dfsg +DEB_UPSTREAM_REPACKAGE_DELIMITER = ~ + +cdbs_upstream_tarball = $(DEB_UPSTREAM_TARBALL_BASENAME).$(DEB_UPSTREAM_TARBALL_EXTENSION) +cdbs_upstream_local_tarball = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).orig.$(if $(findstring $(DEB_UPSTREAM_TARBALL_EXTENSION),tgz),tar.gz,$(DEB_UPSTREAM_TARBALL_EXTENSION)) +cdbs_upstream_repackaged_basename = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION)$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG).orig +cdbs_upstream_uncompressed_tarball = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).orig.tar + +# # These variables are deprecated +_cdbs_deprecated_vars += DEB_UPSTREAM_TARBALL DEB_UPSTREAM_LOCAL_TARBALL DEB_UPSTREAM_REPACKAGE_TARBALL +_cdbs_deprecated_vars += DEB_UPSTREAM_REPACKAGE_EXCLUDES +DEB_UPSTREAM_REPACKAGE_EXCLUDE += $(DEB_UPSTREAM_REPACKAGE_EXCLUDES) + +print-version: + @@echo "Debian version: $(DEB_VERSION)" + @@echo "Upstream version: $(DEB_UPSTREAM_TARBALL_VERSION)" + +get-orig-source: + @@dh_testdir + @@mkdir -p "$(DEB_UPSTREAM_WORKDIR)" + + @if [ ! -s "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ] ; then \ + if [ -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ] ; then \ + rm "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ; \ + fi ; \ + echo "Downloading $(cdbs_upstream_local_tarball) from $(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball) ..." ; \ + wget -nv -T10 -t3 -O "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" "$(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball)" ; \ + else \ + echo "Upstream source tarball have been already downloaded: $(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ; \ + fi + + @md5current=`md5sum "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" | sed -e 's/ .*//'`; \ + if [ -n "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \ + if [ "$$md5current" != "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \ + echo "Expecting upstream tarball md5sum $(DEB_UPSTREAM_TARBALL_MD5), but $$md5current found" ; \ + echo "Upstream tarball md5sum is NOT trusted! Possible upstream tarball forge!" ; \ + echo "Purging downloaded file. Try new download." ; \ + rm -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ; \ + false ; \ + else \ + echo "Upstream tarball is trusted!" ; \ + fi; \ + else \ + echo "Upstream tarball NOT trusted (current md5sum is $$md5current)!" ; \ + fi + +# TODO: Rewrite using make variables like cdbs_upstream_unpack_cmd and +# DEB_UPSTREAM_SUPPORTED_COMPRESSIONS (recent dpkg supports bz2) + @untar="tar -x -C"; \ + case "$(cdbs_upstream_local_tarball)" in \ + *.tar.gz) unpack="gunzip -c";; \ + *.tar.bz2) unpack="bunzip2 -c"; uncompress="bunzip2";; \ + *.tar.Z) unpack="uncompress -c"; uncompress="uncompress";; \ + *.zip) unpack="unzip -q"; uncompress="false"; untar="-d"; nopipe="true";; \ + *.tar) unpack="cat"; uncompress="true";; \ + *) echo "Unknown extension for upstream tarball $(cdbs_upstream_local_tarball)"; false;; \ + esac && \ + if [ -n "$(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE))" ] || [ "$$uncompress" = "false" ]; then \ + echo "Repackaging tarball ..." && \ + mkdir -p "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" && \ + if [ -n "$$nopipe" ]; then \ + $$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" \ + $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \ + else \ + $$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" \ + | $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \ + fi && \ + if [ "$(DEB_UPSTREAM_TARBALL_SRCDIR)" != "$(cdbs_upstream_repackaged_basename)" ]; then \ + mv -T "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(DEB_UPSTREAM_TARBALL_SRCDIR)" "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(cdbs_upstream_repackaged_basename)"; \ + fi && \ + if [ -n "$(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE))" ]; then \ + GZIP=-9 tar -b1 -czf "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_repackaged_basename).tar.gz" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" "$(cdbs_upstream_repackaged_basename)"; \ + else \ + GZIP=-9 tar -b1 -czf "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_uncompressed_tarball).gz" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" "$(cdbs_upstream_repackaged_basename)"; \ + fi && \ + echo "Cleaning up" && \ + rm -rf "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)"; \ + elif [ -n "$$uncompress" ]; then \ + echo "Recompressing tarball ..." && \ + $$uncompress "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)"; \ + gzip -9 "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_uncompressed_tarball)"; \ + fi + +DEB_PHONY_RULES += print-version get-orig-source + +endif --- sugar-pippy-activity-25.orig/debian/cdbs/1/rules/copyright-check.mk +++ sugar-pippy-activity-25/debian/cdbs/1/rules/copyright-check.mk @@ -0,0 +1,111 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2005-2008 Jonas Smedegaard +# Description: Check for changes to copyright notices in source +# +# 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. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_copyright-check +_cdbs_rules_copyright-check := 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), devscripts (>= 2.10.7) + +# Set to yes to fail on changed/new hints are found +#DEB_COPYRIGHT_CHECK_STRICT := yes + +# Single regular expression for files to include or ignore +DEB_COPYRIGHT_CHECK_REGEX = .* +DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(debian/.*|(.*/)?config\.(guess|sub|rpath)(\..*)?)$ + +pre-build:: debian/stamp-copyright-check + +debian/stamp-copyright-check: + @echo 'Scanning upstream source for new/changed copyright notices...' + @echo licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ + "| some-output-filtering..." + +# Perl in shell in make requires extra care: +# * Single-quoting ('...') protects against shell expansion +# * Double-dollar ($$) expands to plain dollar ($) in make + @licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ + | LC_ALL=C perl -e \ + 'print "Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=XXX\n";'\ + 'print "Upstream-Name: Untrusted draft - double-check copyrights yourself!\n\n";'\ + '$$n=0; while (<>) {'\ + ' s/[^[:print:]]//g;'\ + ' if (/^([^:\s][^:]+):[\s]+(\S.*?)\s*$$/) {'\ + ' $$files[$$n]{name}=$$1;'\ + ' $$files[$$n]{license}=$$2;'\ + ' };'\ + ' if (/^\s*\[Copyright:\s*(\S.*?)\s*\]/) {'\ + ' $$files[$$n]{copyright}=$$1;'\ + ' };'\ + ' /^$$/ and $$n++;'\ + '};'\ + 'foreach $$file (@files) {'\ + ' $$file->{license} =~ s/\s*\(with incorrect FSF address\)//;'\ + ' $$file->{license} =~ s/\s+\(v([^)]+) or later\)/-$$1+/;'\ + ' $$file->{license} =~ s/\s*(\*No copyright\*)\s*// and $$file->{copyright} = $$1;'\ + ' $$file->{license} =~ s/^\s*(GENERATED FILE)/UNKNOWN ($$1)/;'\ + ' $$file->{license} =~ s/\s+(GENERATED FILE)/ ($$1)/;'\ + ' $$file->{copyright} =~ s/(?<=(\b\d{4}))(?{$$y=$$^N})\s*[,-]\s*((??{$$y+1}))\b/-$$2/g;'\ + ' $$file->{copyright} =~ s/(?<=\b\d{4})\s*-\s*\d{4}(?=\s*-\s*(\d{4})\b)//g;'\ + ' $$file->{copyright} =~ s/\b(\d{4})\s+([\S^\d])/$$1, $$2/g;'\ + ' $$file->{copyright} =~ s/^\W*\s+\/\s+//g;'\ + ' $$file->{copyright} =~ s/\s+\/\s+\W*$$//;'\ + ' $$file->{copyright} =~ s/\s+\/\s+/\n\t/g;'\ + ' $$pattern = "$$file->{license} [$$file->{copyright}]";'\ + ' push @{ $$patternfiles{"$$pattern"} }, $$file->{name};'\ + '};'\ + 'foreach $$pattern ( sort {'\ + ' @{$$patternfiles{$$b}} <=> @{$$patternfiles{$$a}}'\ + ' ||'\ + ' $$a cmp $$b'\ + ' } keys %patternfiles ) {'\ + ' ($$license, $$copyright) = $$pattern =~ /(.*) \[(.*)\]/s;'\ + ' print "Files: ", join("\n\t", sort @{ $$patternfiles{$$pattern} }), "\n";'\ + ' print "Copyright: $$copyright\n";'\ + ' print "License: $$license\n\n";'\ + '};'\ + > debian/copyright_newhints + @patterncount="`cat debian/copyright_newhints | sed 's/^[^:]*://' | LANG=C sort -u | grep . -c -`"; \ + echo "Found $$patterncount different copyright and licensing combinations." + @if [ ! -f debian/copyright_hints ]; then touch debian/copyright_hints; fi + @newstrings=`diff -u debian/copyright_hints debian/copyright_newhints | sed '1,2d' | egrep '^\+' - | sed 's/^\+//'`; \ + if [ -n "$$newstrings" ]; then \ + echo "$(if $(DEB_COPYRIGHT_CHECK_STRICT),ERROR,WARNING): The following new or changed copyright notices discovered:"; \ + echo; \ + echo "$$newstrings"; \ + echo; \ + echo "To fix the situation please do the following:"; \ + echo " 1) Investigate the above changes and update debian/copyright as needed"; \ + echo " 2) Replace debian/copyright_hints with debian/copyright_newhints"; \ + $(if $(DEB_COPYRIGHT_CHECK_STRICT),exit 1,:); \ + else \ + echo 'No new copyright notices found - assuming no news is good news...'; \ + rm -f debian/copyright_newhints; \ + fi + touch $@ + +clean:: + rm -f debian/stamp-copyright-check + +endif --- sugar-pippy-activity-25.orig/debian/cdbs/1/rules/buildinfo.mk +++ sugar-pippy-activity-25/debian/cdbs/1/rules/buildinfo.mk @@ -0,0 +1,40 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2004-2006 Jonas Smedegaard +# Description: Generate and include build information +# +# 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. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_buildinfo +_cdbs_rules_buildinfo = 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), dh-buildinfo + +common-install-arch common-install-indep:: debian/stamp-buildinfo + +debian/stamp-buildinfo: + dh_buildinfo + touch debian/stamp-buildinfo + +clean:: + rm -f debian/stamp-buildinfo + +endif --- sugar-pippy-activity-25.orig/debian/cdbs/1/class/python-vars.mk +++ sugar-pippy-activity-25/debian/cdbs/1/class/python-vars.mk @@ -0,0 +1,110 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2008 Jonas Smedegaard +# Copyright © 2008 Jonas Smedegaard +# Description: Defines useful variables for Python packages +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA +# 02111-1307 USA. +# + + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_class_python_vars +_cdbs_class_python_vars = 1 + +include $(_cdbs_rules_path)/buildvars.mk$(_cdbs_makefile_suffix) + +DEB_PYTHON_PACKAGES = $(filter-out %-doc %-dev %-common, $(DEB_PACKAGES)) + +DEB_PYTHON_ARCH_PACKAGES = $(filter $(DEB_PYTHON_PACKAGES), $(DEB_ARCH_PACKAGES)) +DEB_PYTHON_INDEP_PACKAGES = $(filter $(DEB_PYTHON_PACKAGES), $(DEB_INDEP_PACKAGES)) + +## FIXME: Resolve DEB_PYTHON_PACKAGES in build targets only +# Avoid including buildcore.mk to not risk breaking when hopefully removing again +cdbs_python_streq = $(if $(filter-out xx,x$(subst $1,,$2)$(subst $2,,$1)x),,yes) +cdbs_python_packages_pre := $(DEB_PYTHON_ARCH_PACKAGES)$(DEB_PYTHON_INDEP_PACKAGES) +cdbs_python_pkgresolve_check = $(if $(call cdbs_python_streq,$(DEB_PYTHON_ARCH_PACKAGES)$(DEB_PYTHON_INDEP_PACKAGES),$(cdbs_python_packages_pre)),, $(warning Setting DEB_PYTHON_*PACKAGES after python-vars in included is currently unsupported)) +## TODO: Rephrase when DEB_PYTHON_PACKAGES is only resolved in build targets +cdbs_python_pkg_check = $(if $(DEB_PYTHON_ARCH_PACKAGES)$(DEB_PYTHON_INDEP_PACKAGES),, $(warning No Python packages found or declared - either rename binary packages or set DEB_PYTHON_PACKAGES (or one or both of DEB_PYTHON_ARCH_PACKAGES and DEB_PYTHON_INDEP_PACKAGES) before including python-vars.mk)) + +# check python system +cdbs_use_xs_field := $(shell grep -q "^XS-Python-Version:" debian/control && echo yes) +cdbs_selected_pycompat := $(shell if [ -e debian/pycompat ]; then cat debian/pycompat; fi) +cdbs_pycompat = $(cdbs_selected_pycompat) +ifeq (pysupport, $(DEB_PYTHON_SYSTEM)) + ifeq (, $(cdbs_selected_pycompat)) + cdbs_pycompat = 2 + endif # use pycompat + # warning pysupport compatibility mode + ifneq (, $(cdbs_use_xs_field)) + $(warning Use of XS-Python-Version and XB-Python-Version fields in 'debian/control' is deprecated with pysupport method, use 'debian/pyversions' if you need to specify specific versions) + endif # use XS field (compat) +else + ifeq (pycentral, $(DEB_PYTHON_SYSTEM)) + ifeq (, $(cdbs_selected_pycompat)) + cdbs_pycompat = 2 + endif # use pycompat + else + ifneq (, $(DEB_PYTHON_SYSTEM)) + $(error unsupported Python system: $(DEB_PYTHON_SYSTEM) (select either pysupport or pycentral)) + else + ifneq (, $(cdbs_use_xs_field)) + $(error Your package uses the new Python policy; you must set DEB_PYTHON_SYSTEM to "pysupport" or "pycentral".) + endif + ifneq (, $(cdbs_selected_pycompat)) + ifeq (yes, $(shell expr $(cdbs_selected_pycompat) \> 1 >/dev/null && echo yes)) + $(error Your package uses the new Python policy; you must set DEB_PYTHON_SYSTEM to "pysupport" or "pycentral".) + endif + endif # use pycompat + endif # unknown method + endif # pycentral +endif # pysupport + +# Calculate cdbs_python_build_versions +cdbs_python_current_version := $(shell pyversions -vd) +## FIXME: Resolve DEB_PYTHON_PACKAGES in build targets only +ifeq (,$(cdbs_python_pkg_check)$(DEB_PYTHON_ARCH_PACKAGES)) + # check if current is in build versions + ifneq ($(cdbs_python_current_version), $(filter $(cdbs_python_current_version), $(shell pyversions -vr))) + cdbs_python_compile_version := $(firstword $(strip $(sort $(shell pyversions -vr)))) + cdbs_python_build_versions := $(cdbs_python_compile_version) + else + cdbs_python_build_versions := $(cdbs_python_current_version) + endif +else +cdbs_python_build_versions := $(shell pyversions -vr) +endif # archall + +# check if build is possible +ifeq (, $(cdbs_python_build_versions)) +ifeq (pysupport, $(DEB_PYTHON_SYSTEM)) +$(error invalid setting in 'debian/pyversions') +else +$(error invalid setting for XS-Python-Version) +endif # system selected +endif # build versions empty + +# TODO: Support multiple python programs built for different python versions +# FIXME: Understand the above sentence and rephrase it +cdbs_python_curpkg_build_versions = $(cdbs_python_build_versions) + +## TODO: Drop this when DEB_PYTHON_PACKAGES is only resolved in build targets +pre-build clean:: + $(cdbs_python_pkgresolve_check) + +endif --- sugar-pippy-activity-25.orig/debian/cdbs/1/class/python-sugar.mk +++ sugar-pippy-activity-25/debian/cdbs/1/class/python-sugar.mk @@ -0,0 +1,94 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2008 Jonas Smedegaard +# Description: Class to build and install Sugar packages +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA +# 02111-1307 USA. +# + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_class_python_sugar +_cdbs_class_python_sugar = 1 + +#include $(_cdbs_class_path)/python-vars.mk$(_cdbs_makefile_suffix) +include debian/cdbs/1/class/python-vars.mk +include $(_cdbs_rules_path)/debhelper.mk$(_cdbs_makefile_suffix) + +# Declare Build-Deps for packages using this file +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-sugar, python-sugar-toolkit (>= 0.81.4-2~), unzip +# FIXME: Resolve DEB_PYTHON_PACKAGES in build targets only +ifeq (,$(cdbs_python_pkg_check)$(DEB_PYTHON_ARCH_PACKAGES)) + ifneq (, $(cdbs_python_compile_version)) + CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python$(cdbs_python_compile_version)-dev, python (>= 2.3.5-11) + else + CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-dev (>= 2.3.5-11) + endif +else +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-all-dev (>= 2.3.5-11) +endif +ifeq (pysupport, $(DEB_PYTHON_SYSTEM)) +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-support (>= 0.3.2) +else +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-central (>= 0.5.6) +endif + +DEB_PYTHON_SUGAR_PACKAGES = $(filter sugar-%-activity, $(DEB_PACKAGES)) + +# TODO: Move this to buildvars.mk +cdbs_pkgsrcdir = $(if $(DEB_PKGSRCDIR_$(cdbs_curpkg)),$(DEB_PKGSRCDIR_$(cdbs_curpkg)),$(DEB_SRCDIR)) + +pre-build:: + mkdir -p debian/stamps-configure + +$(patsubst %,build/%,$(DEB_PYTHON_SUGAR_PACKAGES)) :: build/%: + for pythonver in $(cdbs_python_build_versions); do \ + /usr/bin/python$$ver $(cdbs_pkgsrcdir)/setup.py dist_xo; \ + done + +$(patsubst %,install/%,$(DEB_PYTHON_SUGAR_PACKAGES)) :: install/%: + mkdir -p $(DEB_DESTDIR)usr/share/activities + for pythonver in $(cdbs_python_build_versions); do \ + /usr/bin/python$$ver $(cdbs_pkgsrcdir)/setup.py install $(DEB_DESTDIR)usr/share/activities; \ + done + +$(patsubst %,binary-install/%,$(DEB_PYTHON_SUGAR_PACKAGES)) :: binary-install/%: +ifeq (pysupport, $(DEB_PYTHON_SYSTEM)) + dh_pysupport -p$(cdbs_curpkg) $(DEB_PYTHON_PRIVATE_MODULES_DIRS) $(DEB_PYTHON_PRIVATE_MODULES_DIRS_$(cdbs_curpkg)) +else + dh_pycentral -p$(cdbs_curpkg) +endif + +clean:: $(patsubst %,cleanpythonsugar/%,$(DEB_PYTHON_SUGAR_PACKAGES)) +ifeq (, $(cdbs_selected_pycompat)) + echo "$(cdbs_pycompat)" >debian/pycompat +endif # use pycompat + +$(patsubst %,cleanpythonsugar/%,$(DEB_PYTHON_SUGAR_PACKAGES)) :: cleanpythonsugar/% : + -find "$(cdbs_pkgsrcdir)/dist" -maxdepth 1 -type f -name '*.xo' -exec rm -f '{}' ';' + -rmdir --ignore-fail-on-non-empty "$(cdbs_pkgsrcdir)/dist" + -IFS="`printf '\n'`" find "$(cdbs_pkgsrcdir)/locale" -type f \( -name '*.mo' -or -name 'activity.linfo' \) | while read path; do \ + rm -f "$$path"; \ + rmdir --ignore-fail-on-non-empty "`dirname "$$path"`"; \ + done + -rmdir --ignore-fail-on-non-empty "$(cdbs_pkgsrcdir)/locale" + +## TODO: Drop this when DEB_PYTHON_PACKAGES is only resolved in build targets +pre-build clean:: + $(cdbs_python_pkgresolve_check) + +endif --- sugar-pippy-activity-25.orig/debian/patches/README +++ sugar-pippy-activity-25/debian/patches/README @@ -0,0 +1,3 @@ +0xxx: Grabbed from upstream development. +1xxx: Possibly relevant for upstream adoption. +2xxx: Only relevant for official Debian release. --- sugar-pippy-activity-25.orig/debian/patches/1001_avoid_with_statement.patch +++ sugar-pippy-activity-25/debian/patches/1001_avoid_with_statement.patch @@ -0,0 +1,52 @@ +diff --git a/pippy_app.py b/pippy_app.py +index b311c0a..b303890 100644 +--- a/pippy_app.py ++++ b/pippy_app.py +@@ -15,7 +15,6 @@ + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + """Pippy Activity: A simple Python programming activity .""" +-from __future__ import with_statement + import gtk + import logging + import telepathy +@@ -266,9 +265,12 @@ class PippyActivity(ViewSourceActivity): + start, end = text_buffer.get_bounds() + text = text_buffer.get_text(start, end) + +- with open(filename, 'w') as f: ++ f = open(filename, 'w') ++ try: + for line in text: + f.write(line) ++ finally: ++ f.close() + def _reset_vte(self): + self._vte.grab_focus() + self._vte.feed("\x1B[H\x1B[J\x1B[0;39m") +@@ -733,17 +735,23 @@ def main(): + dirname, filename = os.path.split(path) + dirname = os.path.join(app_temp, dirname) + if not os.path.exists(dirname): os.makedirs(dirname) +- with open(os.path.join(dirname, filename), 'w') as f: ++ f = open(os.path.join(dirname, filename), 'w') ++ try: + f.write(contents) ++ finally: ++ f.close() + # put script into $app_temp/pippy_app.py + copy2(sourcefile, '%s/pippy_app.py' % app_temp) + # write MANIFEST file. +- with open('%s/MANIFEST' % app_temp, 'w') as f: ++ f = open('%s/MANIFEST' % app_temp, 'w') ++ try: + for dirpath, dirnames, filenames in os.walk(app_temp): + for name in filenames: + fn = os.path.join(dirpath, name).replace(app_temp+'/', '') + if fn=='MANIFEST': continue + f.write('%s\n' % fn) ++ finally: ++ f.close() + # invoke bundle builder + olddir = os.getcwd() + oldargv = sys.argv --- sugar-pippy-activity-25.orig/debian/patches/series +++ sugar-pippy-activity-25/debian/patches/series @@ -0,0 +1 @@ +1001_avoid_with_statement.patch