From 94434fb2454fd03d77b63a2cb43f4b133b0237dc Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez <ruben@trisquel.info> Date: Thu, 19 Nov 2020 08:29:33 -0500 Subject: [PATCH] Added 9.0/sugar scripts --- 9.0/sugar/debian/changelog | 5 +++++ 9.0/sugar/debian/compat | 1 + 9.0/sugar/debian/control | 11 +++++++++++ 9.0/sugar/debian/copyright | 22 ++++++++++++++++++++++ 9.0/sugar/debian/install | 1 + 9.0/sugar/debian/rules | 4 ++++ 9.0/sugar/do-all.sh | 5 +++++ 9.0/sugar/package-activity.sh | 35 +++++++++++++++++++++++++++++++++++ 9.0/sugar/update_bundles.sh | 23 +++++++++++++++++++++++ 9 files changed, 107 insertions(+) create mode 100644 9.0/sugar/debian/changelog create mode 100644 9.0/sugar/debian/compat create mode 100644 9.0/sugar/debian/control create mode 100644 9.0/sugar/debian/copyright create mode 100644 9.0/sugar/debian/install create mode 100755 9.0/sugar/debian/rules create mode 100644 9.0/sugar/do-all.sh create mode 100644 9.0/sugar/package-activity.sh create mode 100644 9.0/sugar/update_bundles.sh diff --git a/9.0/sugar/debian/changelog b/9.0/sugar/debian/changelog new file mode 100644 index 00000000..1e9f8e0d --- /dev/null +++ b/9.0/sugar/debian/changelog @@ -0,0 +1,5 @@ +ACTIVITY (VERSION) belenos; urgency=low + + * VERSION release + + -- Ruben Rodriguez <ruben@trisquel.info> DATE diff --git a/9.0/sugar/debian/compat b/9.0/sugar/debian/compat new file mode 100644 index 00000000..7f8f011e --- /dev/null +++ b/9.0/sugar/debian/compat @@ -0,0 +1 @@ +7 diff --git a/9.0/sugar/debian/control b/9.0/sugar/debian/control new file mode 100644 index 00000000..5edde560 --- /dev/null +++ b/9.0/sugar/debian/control @@ -0,0 +1,11 @@ +Source: ACTIVITY +Section: games +Priority: optional +Maintainer: Ruben Rodriguez <ruben@trisquel.info> +Build-Depends: debhelper (>= 7) +Standards-Version: 3.9.2 + +Package: ACTIVITY +Architecture: all +Description: ACTIVITY + An activity for the Sugar learning environment. diff --git a/9.0/sugar/debian/copyright b/9.0/sugar/debian/copyright new file mode 100644 index 00000000..9c1c85af --- /dev/null +++ b/9.0/sugar/debian/copyright @@ -0,0 +1,22 @@ +This package was debianized by Ruben Rodriguez <ruben@trisquel.info> + +It was downloaded from http://activities.sugarlabs.org + + 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 + 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/>. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + diff --git a/9.0/sugar/debian/install b/9.0/sugar/debian/install new file mode 100644 index 00000000..74e4e23b --- /dev/null +++ b/9.0/sugar/debian/install @@ -0,0 +1 @@ +/usr diff --git a/9.0/sugar/debian/rules b/9.0/sugar/debian/rules new file mode 100755 index 00000000..2d33f6ac --- /dev/null +++ b/9.0/sugar/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ diff --git a/9.0/sugar/do-all.sh b/9.0/sugar/do-all.sh new file mode 100644 index 00000000..12c8378d --- /dev/null +++ b/9.0/sugar/do-all.sh @@ -0,0 +1,5 @@ +sh update_bundles.sh + +rm tmp -rf + +ls bundles/|grep '.xo'|xargs -i sh package-activity.sh {} diff --git a/9.0/sugar/package-activity.sh b/9.0/sugar/package-activity.sh new file mode 100644 index 00000000..8620ddc5 --- /dev/null +++ b/9.0/sugar/package-activity.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +set -e + +build(){ + 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') + + echo $ACTIVITY + + 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 + done +else + build $1 +fi diff --git a/9.0/sugar/update_bundles.sh b/9.0/sugar/update_bundles.sh new file mode 100644 index 00000000..f091f3ea --- /dev/null +++ b/9.0/sugar/update_bundles.sh @@ -0,0 +1,23 @@ + +set -e + +rm -rf bundles +mkdir bundles + +for repo in browse-activity calculate-activity chat imageviewer-activity jukebox-activity log-activity Pippy read-activity terminal-activity turtleart-activity write-activity activity-abacus AnalyzeJournal clock-activity colordeducto deducto develop-activity flip flipsticks fractionbounce gcompris-wrapper-activity sugarchess iknowmyabcs iq-activity implode-activity jumble-activity lettermatch locosugar maze-activity Measure moon-activity music-keyboard-activity napier nutrition paint-activity periodic-table poll-activity portfolio-activity pukllanapac recall record-activity reflection speak stopwatch story typing-turtle-activity wordcloud words-activity irc-activity memorize-activity +do + git clone https://github.com/sugarlabs/$repo.git bundles/$repo + +dos2unix bundles/$repo/activity/activity.info + +activity=$(grep "^name *=" bundles/$repo/activity/activity.info| sed 's/.*=//;s/ //g') +version=$(grep "^activity_version *=" bundles/$repo/activity/activity.info| sed 's/.*=//;s/ //g') + +rm bundles/$repo/.git* -rf + +#mv bundles/$repo bundles/$activity +mv bundles/$repo bundles/$activity.activity +(cd bundles ; zip -r ${activity}-${version}.xo $activity.activity) + + +done -- GitLab