%post --nochroot # activities.sugarlabs.org (ASLO) installed-packages # Fructose ASLO="$ASLO org.laptop.WebActivity" ASLO="$ASLO org.laptop.TurtleArtActivity" ASLO="$ASLO org.laptop.sugar.ReadActivity" ASLO="$ASLO org.laptop.ImageViewerActivity" ASLO="$ASLO org.laptop.Pippy" ASLO="$ASLO org.laptop.Terminal" ASLO="$ASLO org.laptop.sugar.Jukebox" ASLO="$ASLO org.laptop.Log" ASLO="$ASLO org.laptop.Chat" ASLO="$ASLO org.laptop.Calculate" ASLO="$ASLO org.laptop.AbiWordActivity" # Honey subset ASLO="$ASLO org.laptop.community.TypingTurtle" ASLO="$ASLO org.sugarlabs.IRC" ASLO="$ASLO com.garycmartin.Moon" ASLO="$ASLO org.laptop.sugar.ReadEtextsActivity" ASLO="$ASLO com.ywwg.CartoonBuilderActivity" ASLO="$ASLO vu.lux.olpc.Speak" ASLO="$ASLO org.laptop.ViewSlidesActivity" ASLO="$ASLO org.sugarlabs.InfoSlicer" ASLO="$ASLO org.worldwideworkshop.olpc.FlipSticks" ASLO="$ASLO org.worldwideworkshop.olpc.JigsawPuzzle" ASLO="$ASLO org.worldwideworkshop.olpc.SliderPuzzle" ASLO="$ASLO org.laptop.community.Colors" ASLO="$ASLO org.squeak.FreeCell" ASLO="$ASLO org.laptop.TamTamEdit" ASLO="$ASLO org.laptop.TamTamJam" ASLO="$ASLO org.laptop.TamTamMini" ASLO="$ASLO org.laptop.TamTamSynthLab" ASLO="$ASLO org.laptop.Memorize" ASLO="$ASLO org.worldwideworkshop.JokeMachineActivity" ASLO="$ASLO vu.lux.olpc.Maze" ASLO="$ASLO org.worldwideworkshop.olpc.storybuilder" ASLO="$ASLO org.worldwideworkshop.PollBuilder" ASLO="$ASLO org.gnome.Labyrinth" ASLO="$ASLO org.laptop.RecordActivity" ASLO="$ASLO org.laptop.Oficina" ASLO="$ASLO tv.alterna.Clock" ASLO="$ASLO org.laptop.physics" ASLO="$ASLO org.laptop.sugar.GetIABooksActivity" ASLO="$ASLO org.laptop.Arithmetic" ASLO="$ASLO org.laptop.community.FoodForce2" ASLO="$ASLO org.sugarlabs.SlideruleActivity" ASLO="$ASLO com.socialtext.SocialCalcActivity" ASLO="$ASLO org.sugarlabs.VisualMatchActivity" ASLO="$ASLO edu.mit.media.ScratchActivity" WD=$PWD BUNDLES_DIR=$INSTALL_ROOT/usr/share/sugar/bundles mkdir -p $BUNDLES_DIR cd $BUNDLES_DIR CACHE_DIR=$WD/../cache/aslo mkdir -p $CACHE_DIR ASLO_SP='0.86' ASLO_URL='http://activities.sugarlabs.org/services/update-aslo.php' ASLO_LINK='.//{http://www.mozilla.org/2004/em-rdf#}updateLink' for bundle_id in $ASLO ; do curl -4 -s -L "$ASLO_URL?id=$bundle_id&appVersion=$ASLO_SP" > $CACHE_DIR/metadata url=$(python -c "from xml.etree.ElementTree import parse; url=parse('$CACHE_DIR/metadata').find('$ASLO_LINK'); print url is not None and url.text or ''") if [ -z "$url" ]; then echo "Can not find url for $bundle_id" >&2 continue fi remote_file=$(basename $(curl -4 -s -L -w %{url_effective} -I $url | tail -1)) bundle=$CACHE_DIR/$remote_file if [ ! -f $bundle ] ; then curl -4 -L $url > $bundle fi cp -p $bundle $BUNDLES_DIR done # pull sample content for the journal PDFS="$PDFS africa.pdf" PDFS="$PDFS asia.pdf" PDFS="$PDFS central_america.pdf" PDFS="$PDFS europe.pdf" PDFS="$PDFS middle_east.pdf" PDFS="$PDFS north_america.pdf" PDFS="$PDFS oceania.pdf" PDFS="$PDFS south_america.pdf" PDFS="$PDFS southeast_asia.pdf" for pdf in $PDFS ; do url=http://dev.sugarlabs.org/raw-attachment/ticket/840/$pdf remote_file=$(basename $(curl -4 -s -L -w %{url_effective} -I $url | tail -1)) bundle=$CACHE_DIR/$remote_file if [ ! -f $bundle ] ; then curl -s -4 -L $url > $bundle fi cp -p $bundle $BUNDLES_DIR done # e-books from project gutenberg EPUB="$EPUB 3455" # Nederlandsche Sagen en Legenden EPUB="$EPUB 11339" # Aesop's Fables EPUB="$EPUB 11589" # Les Voyages Extraordinaires EPUB="$EPUB 17157" # Gulliver's Travels EPUB="$EPUB 17161" # Max und Moritz EPUB="$EPUB 17396" # The Secret Garden EPUB="$EPUB 22566" # Dorothy and the Wizard in Oz EPUB="$EPUB 24022" # A Christmas Carol EPUB="$EPUB 28314" # The Yellow Fairy Book EPUB="$EPUB 28371" # Le avventure d'Alice nel paese delle meraviglie EPUB="$EPUB 28885" # Alice's Adventures in Wonderland EPUB="$EPUB 30510" # Perolas e Diamantes for epub in $EPUB ; do url=http://www.gutenberg.org/cache/epub/$epub/pg$epub-images.epub remote_file=$(basename $(curl -4 -s -L -w %{url_effective} -I $url | tail -1)) bundle=$CACHE_DIR/$remote_file if [ ! -f $bundle ] ; then curl -s -4 -L $url > $bundle fi cp -p $bundle $BUNDLES_DIR done # get the script to install the activities cp -p $WD/../install-activity.py . chmod a+x ./install-activity.py # get sample content setup script directly from git cp -p $WD/../copy-to-datastore.py . chmod a+x ./copy-to-datastore.py # FIXME: this should be the same uid as CREATE_USERNAME *in the chroot*, # but is hardcoded here for simplicity chown -R 500:500 $BUNDLES_DIR cd $WD %end