Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar.ks
blob: 9cb787c3ac1fb3beb82b66de4adda6327730757a (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
repo --name=sugar --baseurl=http://download.sugarlabs.org/soas/repositories/2/

%packages

# sugar!
@sugar-desktop

# additional packages
espeak
etoys
numpy
olpcsound
pygame
squeak-vm

# e-mail client
alpine

# multimedia implementations
gnash-plugin
totem-mozplugin

%end

%post
cat >> /etc/rc.d/init.d/livesys << EOF

# add Sugar repository to yum
cat >> /etc/yum.repos.d/sugar.repo << FOE
[sugar]
name=Sugar
failovermethod=priority
baseurl=http://download.sugarlabs.org/soas/repositories/2/
enabled=1
gpgcheck=0
FOE

# fix permissions on home directory
chown liveuser /home/liveuser
chgrp liveuser /home/liveuser

# setup Xclients
cat >> /home/liveuser/.Xclients << FOE
xsetroot -def

eval \\\$(dbus-launch --sh-syntax --exit-with-session)

RESOLUTION=\\\$(xdpyinfo | grep resolution | sed "s/.* \\([0-9][0-9]*\\)x.*/\\1/")
if [ "\\\$RESOLUTION" -gt 150 ]; then
    SUGAR_SCALING=100
else
    SUGAR_SCALING=72
fi

SUGAR_SCALING=\\\$SUGAR_SCALING sugar
FOE

# fix issues with dbus and ck
rm /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh

chmod a+x /home/liveuser/.Xclients
chown liveuser:liveuser /home/liveuser/.Xclients

# setup activity directory
mkdir -p /home/liveuser/Activities
chown liveuser:liveuser /home/liveuser/Activities
chown liveuser:liveuser /usr/share/sugar/honey
for bundle in \`find /usr/share/sugar/honey -maxdepth 1\` ; do
ln -s \$bundle /home/liveuser/Activities
done
EOF	

%end

%post --nochroot

ASLO="$ASLO 4042" # InfoSlicer
ASLO="$ASLO 4034" # Moon
ASLO="$ASLO 4046" # JigsawPuzzle
ASLO="$ASLO 4047" # SliderPuzzle
ASLO="$ASLO 4063" # Memorize
ASLO="$ASLO 4038" # Speak
ASLO="$ASLO 4026" # Typing Turtle
ASLO="$ASLO 4040" # Finance
ASLO="$ASLO 4037" # CartoonBuilder
ASLO="$ASLO 4044" # FlipSticks
ASLO="$ASLO 4064" # JokeMachine
ASLO="$ASLO 4029" # IRC
ASLO="$ASLO 4054" # FreeCell
ASLO="$ASLO 4039" # ViewSlides
ASLO="$ASLO 4055" # Bounce
ASLO="$ASLO 4050" # Colors
ASLO="$ASLO 4071" # Maze

WD=$PWD
BUNDLES_DIR=$INSTALL_ROOT/usr/share/sugar/honey

mkdir -p $BUNDLES_DIR
cd $BUNDLES_DIR

for id in $ASLO ; do
  curl -L http://activities.sugarlabs.org/en-US/sugar/downloads/latest/$id > $id.xo
done

for file in *.xo ; do
    unzip $file
    rm $file
done

cd $WD

%end