Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/soas-sugar.ks
blob: b8b72801869614be4bd9ede73d33e873cf0958cf (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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
%include soas-base.ks

repo --name=sugar --baseurl=http://download.sugarlabs.org/soas/repositories/3/

%packages

# glucose modules
sugar
etoys
hulahop
squeak-vm

# sugar platform
csound-python
espeak
gnome-python2-evince
libffi
libxml2-python 
numpy
pyabiword
pygame

# additional packages
DeviceKit-disks
evince-djvu
gvfs
olpc-utils
vte

# e-mail client
alpine

# multimedia implementations
gnash-plugin

# work around for keyboard layout
system-config-keyboard

# allow reproduction of images
livecd-tools

# pull plymouth theme
plymouth-theme-soas

# allow better power management
gnome-power-manager

# additional wifi support
b43-openfwwf

# allow installation and first boot configuration
anaconda
firstboot
smolt-firstboot

# sound
pulseaudio
alsa-plugins-pulseaudio
alsa-utils
gstreamer-plugins-good
gstreamer-plugins-espeak

%end

%post

# make sure to remove olpc-configure
rm -f /etc/rc.d/init.d/diskspacecheck
rm -f /etc/rc.d/init.d/diskspacerecover
rm -f /etc/rc.d/init.d/olpc-configure
rm -f /etc/X11/xorg-*.conf

cat > /etc/sysconfig/desktop <<EOF
DISPLAYMANAGER=/usr/sbin/olpc-dm
EOF

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

# try to work-around issues with NM and APs
rm -f /etc/NetworkManager/dispatcher.d/05-netfs

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

# permanently set %__dbi_cdb rpm macro to work around jffs2's lack of writeable mmap()
mkdir -p /etc/rpm
echo "%__dbi_cdb create private nommap" > /etc/rpm/macros.rpmdb

# 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/3/
enabled=1
gpgcheck=0
FOE

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

# setup Xclients
cat >> /home/olpc/.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

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

# disable the logout menu item in Sugar
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /desktop/sugar/show_logout false >/dev/null

# add more activities to the favorites
cat > /usr/share/sugar/data/activities.defaults << FOE
com.garycmartin.Moon
org.laptop.AbiWordActivity
org.laptop.Calculate
org.laptop.Chat
org.sugarlabs.InfoSlicer
org.sugarlabs.IRC
org.laptop.Memorize
org.laptop.Pippy
org.laptop.TurtleArtActivity
org.laptop.WebActivity
org.vpri.EtoysActivity
org.laptop.Oficina
org.laptop.RecordActivity
org.gnome.Labyrinth
org.laptop.physics
vu.lux.olpc.Speak
org.worldwideworkshop.olpc.JigsawPuzzle
FOE

# unzip activities and clean up
cd /usr/share/sugar/bundles
ACTIVITY_DIR=/home/olpc/Activities
mkdir -p \$ACTIVITY_DIR
chown -R 500:500 \$ACTIVITY_DIR

chmod a+x install-activity.py
for file in *.xo; do
    su olpc -c "./install-activity.py \$file"
    rm -f \$file
done

# execute sample content script and clean up afterwards
chmod a+x copy-to-datastore.py
su olpc -c ./copy-to-datastore.py
rm -f *.pdf

# check modules and themes
rm -f /usr/share/firstboot/modules/create_user.*
rm -f /usr/share/firstboot/modules/date.*
# firstboot -r

EOF

%end