Commit 85f6dfab authored by Ruben Rodriguez's avatar Ruben Rodriguez

Added scripts for packaging the Sugar learning environment

parent 5e9ac84b
ACTIVITY (VERSION) belenos; urgency=low
* VERSION release
-- Ruben Rodriguez <> DATE
Section: games
Priority: optional
Maintainer: Ruben Rodriguez <>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.9.2
Architecture: all
Description: ACTIVITY
An activity for the Sugar learning environment.
This package was debianized by Ruben Rodriguez <>
It was downloaded from
Copyright The autors
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 of the License, 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
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 <>.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
#!/usr/bin/make -f
dh $@
set -e
rm -rf tmp
ACTIVITY=sugar-activity-$(echo $1 |sed 's/-.*//; s/\(.*\)/\L\1/; s/_/-/')
VERSION=$(echo $1 |sed 's/.*-//; s/\.xo//')
DATE=$(LANG=en date '+%a, %d %b %Y %T +0000')
mkdir -p tmp/$ACTIVITY/usr/share/sugar/activities
unzip bundles/$1 -d tmp/$ACTIVITY/usr/share/sugar/activities/
cp debian -a tmp/$ACTIVITY
sed -i "s/ACTIVITY/$ACTIVITY/" -i tmp/$ACTIVITY/debian/*
sed -i "s/VERSION/$VERSION/" -i tmp/$ACTIVITY/debian/*
sed -i "s/DATE/$DATE/" -i tmp/$ACTIVITY/debian/*
mkdir -p tmp/$ACTIVITY/usr/share/locale
cp tmp/$ACTIVITY/usr/share/sugar/activities/*/locale/* tmp/$ACTIVITY/usr/share/locale/ -a || true
rm -rf tmp/$ACTIVITY/usr/share/locale/*/activity.linfo
cd tmp/$ACTIVITY
dpkg-buildpackage -us -uc
cd ../..
if [ 1$1 = 1 ]; then
for BUNDLE in $(ls -1 bundles |grep xo$); do
build $BUNDLE
build $1
set +e
rm -f /home/systems/devel/repos/belenos/incoming/*
cp tmp/* /home/systems/devel/repos/belenos/incoming/
cd /home/systems/devel/repos/belenos/
sh ../ belenos
sh ../ belenos
cd bundles
rm -f *.xo*
for bundle in '
'; do
wget --trust-server-names $bundle
cd bundles
cat << EOF > update.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en" lang="en" dir="ltr">
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>Activity update list</title>
for BUNDLE in *.xo; do
VERSION=$(unzip -p $BUNDLE */activity/|grep ^activity_version |sed 's/.*= *//')
ID=$(unzip -p $BUNDLE */activity/|grep ^bundle_id |sed 's/.*= *//')
NAME=$(unzip -p $BUNDLE */activity/|grep ^name |sed 's/.*= *//')
cat << EOF >> update.html
<span class="olpc-activity-info">
<span class="olpc-activity-id" style="display:none;">$ID</span>
<span class="olpc-activity-version" style="display:none;">$VERSION</span>
<span class="olpc-activity-url"><a href="./$BUNDLE">$NAME</a> ($VERSION)</span>
cat << EOF >> update.html
set -e
DATE=$(date +%Y%m%d)
DDATE=$(date +%a,\ %d\ %B\ %Y\ %H:%M:%S\ %z)
cd $WD
[ $1 == sugar ] && GIT="" && TAG="0.104.0"
[ $1 == sugar-artwork ] && GIT="" && TAG="0.104.0"
#[ $1 == sugar-base ] && GIT="git://" && TAG="0.98.0"
[ $1 == sugar-datastore ] && GIT="" && TAG="0.104.0"
[ $1 == sugar-toolkit ] && GIT="git://" && TAG="0.98.1"
[ $1 == sugar-toolkit-gtk3 ] && GIT="" && TAG="0.104.0"
git clone $GIT $WD/build/$1
pushd $WD/build/$1
TAG=$(git describe --abbrev=0 --tags|sed 's/v//')
MAJOR=$(echo $TAG|cut -d. -f1,2)
git checkout 'v'$TAG
cp -a $1 $WD/build/$1/debian
sed "s/MAJOR/$MAJOR/" -i $WD/build/$1/debian/changelog $WD/build/$1/debian/control*
sed "s/DETAIL/${MAJOR}trisquel$DATE/" -i $WD/build/$1/debian/changelog
sed "s/DATE/$DDATE/" -i $WD/build/$1/debian/changelog
rm -rf $WD/build/
mkdir -p $WD/build/
if [ 1$1 != '1' ]; then
clone $1
clone sugar; clone sugar-artwork; clone sugar-datastore; clone sugar-toolkit-gtk3
mv $WD/build/ $WD/build-$(arch)
cd $WD/build-$(arch)
export NO_PKG_MANGLE=true
apt-get install -q -y --force-yes dh-buildinfo python-gtk2-dev libgconf2-dev python-empy libwebkitgtk-3.0-dev icon-slicer icon-naming-utils x11-apps chrpath python-gobject-dev libasound2-dev librsvg2-dev d-shlibs python-all-dev gnome-common libgirepository1.0-dev
for i in *; do
pushd $i
make distclean
export QUILT_PATCHES=debian/patches
quilt push -a || true
dpkg-buildpackage -us -uc
Building this package for Debian
This source package need no special handling for normal package builds.
Developing this package for Debian
The source of this package is developed using git and the helper tool
git-buildpackage, with all official releases tagged and signed and
binary diffs of tarballs stored using pristine-tar. This is documented
below /usr/share/doc/git-buildpackage/manual-html/ .
Upstream development is tracked both in the Git branch "upstream-git"
and using upstream tarballs.
A custom build target shows current upstream and packaging versions:
debian/rules print-version
Current upstream tarball can be prepared using this other build target:
debian/rules get-orig-source
To switch to newer upstream source, first add a dummy changelog entry
and comment out DEB_UPSTREAM_TARBALL_MD5 before getting the source:
dch -v ${new_upstream_version}-1 "Dummy changelog entry"
sed -i -e 's/^\(DEB_UPSTREAM_TARBALL_MD5\b\)/#\1/' debian/rules
debian/rules get-orig-source
Store new md5sum to help ensure identical source is received later.
Before injecting a newer upstream tarball, use below commands to sync
with upstream Git, to adopt upstream commit messages and to minimize
size of our Git.
The following commands updates the local mirror of upstream source:
git checkout upstream-git
git pull
git fetch --tags
The following command shows upstream changes possibly relevant to merge
or cherry-pick (replace leading "upstream" with "HEAD^" and invoke
immediately after syncing to show recently merged changes possibly
relevant to mention in our changelog):
git log --pretty="format:%h %s" upstream..upstream-git
The following commands merges all upstream changes with our packaging
branches (to skip newest upstream changes, replace dot in first pull
command with either a tag or an explicit commit hash):
git checkout upstream
git pull . upstream-git
git checkout master
git pull . upstream
If git-import-orig fails complaining about no changes, revert both pulls
(using "git reset --hard HEAD^" in both master and upstream branches),
and try again skipping the very newest changes to cheat git-import-orig.
To do 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 "." to mimic git-buildpackage logic (replace
timestamp and commit hash below with real ones based on chosen commit).
git log --abbrev-commit upstream-git
git tag -s -m "Upstream snapshot" upstream/0.2.git20080130 61279f8
dch -r -v "0.2~git20080130-1" "New upstream Git snapshot."
Setting DEB_MAINTAINER_MODE=1 enables additional build routines helpful
during development of the package, but unfit for normal builds. This
typically includes the CDBS feature of auto-updating debian/control with
CDBS-related build-dependencies, which is forbidden by Debian Policy as
build environment must not change during automated builds.
Maintaining packaging build routines
This source package wraps debhelper commands and other tedious parts of
the build routines using the CDBS framework. Please refer to the actual
makefile snippets included from debian/rules for details on their
purpose and ways to override defaults. Additionally, makefile snippets
included from below /usr/share/cdbs may also be documented in
/usr/share/doc/cdbs/cdbs-doc.pdf.gz .
-- Jonas Smedegaard <> Sun, 29 Mar 2009 16:02:47 +0200
* Resolve possible new owners and licensing of src/sugar/dispatch/*.py
sugar-base-MAJOR (DETAIL) unstable; urgency=low
* New upstream release.
-- Ruben Rodríguez <> DATE
sugar-base-0.96 (0.96.0-1) unstable; urgency=low
* New upstream release.
* Use for Vcs-Browser field.
* Refresh patch 1001.
* Update copyright file:
+ Bump format to 1.0.
+ Fix double-indent in Copyright fields as per Policy §5.6.13.
+ Fix concistently use ~ (not ˜) in derivative License shortnames.
* Fix typo in long description.
* Bump standards-version to 3.9.3.
-- Jonas Smedegaard <> Thu, 24 May 2012 18:54:11 +0200
sugar-base-0.92 (0.92.0-1) unstable; urgency=low
* New upstream release.
* Switch packaging to upstream branch 0.92.
* Update copyright file: Extend years.
-- Jonas Smedegaard <> Mon, 25 Jul 2011 01:28:04 +0200
sugar-base-0.90 (0.90.1-2) unstable; urgency=low
* Update README.source to not mention quilt: Source format 3.0 use it
internally, but there it is standard and thus need no mention here.
* Update copyright file:
+ Rewrite using draft 174 of DEP-5 syntax.
+ Fix use exceptions (not bogus License sections).
+ Tighten License section naming.
* Add patch 1001 to add compatibility with ipython 0.11.
Closes: bug#635289. Thanks to Julian Taylor.
* Bump policy compliance to standards-version 3.9.2.
* Remove la file.
Closes: bug#633235.
* Use Python helper python2 (not pycentral).
Closes: bug#617082.
-- Jonas Smedegaard <> Mon, 25 Jul 2011 00:41:13 +0200
sugar-base-0.90 (0.90.1-1) unstable; urgency=low
* New upstream stable release.
* Switch packaging to upstream branch 0.90.
* Improve copyright file:
+ Add comment on Expat variation.
+ Rename and tighten other-GAP-* sections.
+ List license section of most commonly used LGPL-2+ before GPL-2+.
+ Fix replace license section MIT with Expat and other-X.
* Bump Policy compliance to standards-version 3.9.1.
* Append _DEFAULT to deprecated CDBS variables in rules file.
* Shorten Vcs-* stanzas.
* Ease building with git-buildpackage: Git-ignore quilt .pc dir, and
add source local-options.
-- Jonas Smedegaard <> Tue, 12 Oct 2010 15:47:24 +0200
sugar-base-0.88 (0.88.0-1) unstable; urgency=low
* New upstream stable release.
* Drop all local CDBS snippets: included with main cdbs package now.
* Switch to source format "3.0 (quilt)".
* Drop snippet: superfluous with source format "3.0
* Drop build-dependencies on quilt and patchutils.
* Relax build-dependencies on python-central and python-all-dev.
* Relax build-dependency on devscripts slightly, to ease backporting.
* Tighten build-dependency on cdbs.
* Add git-buildpackage hint about use of bzip2-compressed tarballs.
* Drop patches: Upstream includes danish l10n now.
* Update debian/copyright:
+ Reformat to conform to draft DEP5 rev. 135.
+ Add GPL disclaimers.
+ Adjust years for debian/*.
-- Jonas Smedegaard <> Tue, 30 Mar 2010 17:18:37 +0200
sugar-base-0.88 (0.87.1-1) unstable; urgency=low
* New upstream development release.
* Unfuzz patches.
-- Jonas Smedegaard <> Tue, 01 Dec 2009 15:22:39 +0100
sugar-base-0.88 (0.86.0-1) experimental; urgency=low
* Switch packaging to branch 0.88.
* Release for experimental, as not all parts of 0.88 branch are
packaged yet.
-- Jonas Smedegaard <> Fri, 20 Nov 2009 21:02:00 +0100
sugar-base-0.86 (0.86.0-1) unstable; urgency=low
* New upstream stable release.
-- Jonas Smedegaard <> Wed, 30 Sep 2009 17:48:04 +0200
sugar-base-0.86 (0.85.6-1) unstable; urgency=low
* New upstream development release.
* Simplify watch file (we want to watch too new files too).
* Fix include cdbs-declared dependencies (i.e. fix depend on
-- Jonas Smedegaard <> Fri, 18 Sep 2009 21:02:46 +0200
sugar-base-0.86 (0.85.5-1) unstable; urgency=low
* New upstream development release.
-- Jonas Smedegaard <> Thu, 10 Sep 2009 21:40:32 +0200
sugar-base-0.86 (0.85.4-1) unstable; urgency=low
* New upstream development release.
* Fix licensing of libtool files in debian/copyright (Eazel author
only of m4/intltool.m4, no new licenses).
* Set non-build dependencies using recursively-expanded variables
("=", not ":=") in debian/rules.
* Depend on python-decorator.
-- Jonas Smedegaard <> Thu, 10 Sep 2009 20:13:32 +0200
sugar-base-0.84 (0.84.1-2) unstable; urgency=low
* Rewrite copyright to use DEP5 r54 proposed machine-readable format.
* Bump up policy compliance to standards version 3.8.3.
* Update OLPC relation (now historic) in long description.
* Update CDBS snippets:
+ Enhance to support all binary package
relations (except -indep ones).
+ Improve cleanup to cover debhelper 6 and 7,
strip more whitespace and cover mixture of unversioned+versioned
+ Silence applying dependencies in
+ Implement fail-source-not-repackaged rule in
+ Update URL to draft DEP5 format in output.
-- Jonas Smedegaard <> Thu, 10 Sep 2009 17:42:20 +0200
sugar-base-0.84 (0.84.1-1) unstable; urgency=low
* New upstream release.
* Add PyDispatcher license to copyright file.
-- Jonas Smedegaard <> Fri, 29 May 2009 01:48:36 +0200
sugar-base-0.84 (0.84.0-1) unstable; urgency=low
* New upstream release.
* Drop patch 0000 (backported snapshot) now included upstream.
* Update patch 1001 (danish locale).
* Unfuzz patch 2991.
* Append branch to source and binary package names and Sugar-specific
package relations, to support multiple branches in same distribution
* Fix debian/copyright (more owners, same licenses).
* Add README.source (and drop CDBS hints and README.packaging).
* Enable tag signing in git-buildpackage configfile.
* Enhance to support all binary package relations
(except -indep ones).
* Update copyright and licensing info:
+ Add proper copyright header to debian/rules
+ Update debian/copyright and hints (extend years)
+ Add TODO about possible missing license for src/sugar/dispatch/*
* Drop URLs in debian/copyright and watch file.
* Use download URL (not one) for
upstream-tarball routine.
* Use wiki page (not bare domain URL) as Homepage.
* Maintain all package dependencies in debian/rules, with comments.
* Limit to supporting only Python 2.5 and newer (upstream never used
older than that, and Debian no longer use older either so unlikely
to get proper testing if it works).
* Bump standards-version to 3.8.1.
-- Jonas Smedegaard <> Mon, 06 Apr 2009 02:07:52 +0200
sugar-base (0.82.2-5) unstable; urgency=medium
* Add (not yet used) sugarlabs URL to watch file.
* Add git-buildpackage configfile.
* Update debian/copyright and copyright hints:
+ Bump to version 428 of new format (no structural changes)
+ Set Sugarlabs (not Redhat) as upstream maintainer, and add both
old and new source URLs.
+ Merge entries with same authors and licensing (varying only in
copyright years).
+ Update copyright years
+ Include GAP licenses verbatim.
* Set urgency=medium due to copyright and licensing corrections.
-- Jonas Smedegaard <> Tue, 20 Jan 2009 07:18:10 +0100
sugar-base (0.82.2-4) unstable; urgency=low
* Add patch 0000 to sync with upstream stable head:
+ Update aymara (ay) and turkish (tr) translations
* Limit watch file to track stable 0.82 branch.
* Update CDBS snippets:
+ Fix use underscore (not dash) in internal variable
+ Ignore only debian changelog and copyright-related files by
default in
+ Correct and update copyright hints of the snippets themselves
* Update debian/copyright and copyright hints:
+ Add info on CDBS snippets (new owners, no new licenses)
+ Bump to version 420 of new format (no structural changes)
+ Add sugar-devel mailinglist as upstream maintainer.
+ Update upstream source URLs.
+ Refer to LGPL as "GNU Library..." (not Lesser).
+ Refer to "Debian GNU systems" (not only GNU/Linux).
* Update Homebase URL.
-- Jonas Smedegaard <> Sun, 21 Dec 2008 00:06:38 +0100
sugar-base (0.82.2-3) unstable; urgency=low
* Update CDBS snippet Compact simple licenses
(those without ' or later').
* Update CDBS snippet Cleanup check stamp dir for
flavored builds. Fixing failure to build twice in a row.
-- Jonas Smedegaard <> Tue, 11 Nov 2008 19:07:54 +0100
sugar-base (0.82.2-2) unstable; urgency=low
* Update cdbs snippets:
+ Fix to run dh_py* scripts before
dh_installinit. See bug#494288.
+ Fix to create check stamp dir for flavored builds.
+ Several minor improvements to
-- Jonas Smedegaard <> Sun, 19 Oct 2008 20:52:04 +0200
sugar-base (0.82.2-1) unstable; urgency=low
* New upstream release.
* Depend on ${misc:Depends}.
-- Jonas Smedegaard <> Sun, 19 Oct 2008 13:59:30 +0200
sugar-base (0.82.1-1) unstable; urgency=low
* New upstream release.
* Add patch 1001 adding danish l10n.
* Add patch 2991 to enable danish l10n in configure.
* Build-depend on intltool.
* Update local cdbs snippets:
+ Restructure output of to match new proposed
copyright-format at .
+ Improved multiflavor handling in makefile and autotools snippets.
+ Add new local to merge duplicate
build-dependencies and more. Drop cleanup in debian/rules.