Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/soas-sugar.ks
blob: aa40dfab133f7c63011725aafbb0adbfb463f40b (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
%include fedora-mini-base.ks

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

%packages --excludedocs --instLangs en:es:ar:pl:pt_BR:pt:it:fr:ht:el:mn:mr_IN:th:am_ET:km_KH:ne_NP:ur_PK:rw:ja:de:tr:te:ps:fa_AF:si

# sugar!
sugar*

# addtional packages
etoys
gdm

# some removals
-sugar-emulator
-sugar-help
-sugar-xomail

# olpc
dracut-modules-olpc
ohm
olpc-kbdshim

# internet
alpine

# multimedia
gnash-plugin
gtk-recordmydesktop

# system
PackageKit-browser-plugin
gettext
gnome-power-manager
gnugo
gparted
livecd-tools
zyx-liveinstaller

# hardware
b43-openfwwf
libertas-usb8388-firmware

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

# fonts
google-droid-fonts-common
google-droid-sans-fonts
google-droid-sans-mono-fonts
google-droid-serif-fonts

# strip fedora trademarks and use the soas release package
-fedora-logos
-fedora-release
-fedora-release-notes
generic-logos
generic-release
generic-release-notes

%end

%post

cat >> /etc/rc.d/init.d/livesys << EOF
# make sure the fonts are not too big in Sugar
echo "Xft.dpi: 150" > /home/liveuser/.Xresources
chown liveuser:liveuser /home/liveuser/.Xresources

EOF

# 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

# change build strings
echo "SoaS release 3 (Snapshot)" > /etc/fedora-release
echo "cpe://o:sugarlabs:soas:3" > /etc/system-release-cpe

# set up auto-login
cat >> /etc/gdm/custom.conf << FOE
[daemon]
AutomaticLoginEnable=true
AutomaticLogin=liveuser
FOE

# 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

# disable screensaver locking
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-screensaver/lock_enabled false >/dev/null

# set sugar power management on
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /desktop/sugar/power/automatic True >/dev/null

# change bug report page in browse
sed -i -e 's/dev.sugarlabs.org/launchpad.net\/soas/' /usr/share/sugar/activities/Browse.activity/data/index.html

# and do so for the e-book page too
sed -i -e 's/schoolserver\//wiki.sugarlabs.org\/go\/Sugar_on_a_Stick\/E-Books/' /usr/share/sugar/activities/Browse.activity/data/index.html
sed -i -e 's/school/books/' /usr/share/sugar/activities/Browse.activity/data/index.html

# 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.gnome.Labyrinth
org.laptop.physics
vu.lux.olpc.Speak
org.worldwideworkshop.olpc.JigsawPuzzle
org.laptop.TamTamEdit
org.laptop.TamTamJam
org.laptop.TamTamMini
org.laptop.TamTamSynthLab
org.laptop.sugar.GetIABooksActivity
org.laptop.Arithmetic
com.socialtext.SocialCalcActivity
org.sugarlabs.VisualMatchActivity
edu.mit.media.ScratchActivity
org.laptop.community.TypingTurtle
vu.lux.olpc.Maze
org.laptop.sugar.ReadEtextsActivity
FOE

# set sugar scaling
cat >> /etc/X11/xinit/xinitrc.d/70-sugar-scaling.sh << FOE
#!/bin/bash
# Copyright (C) 2009 Martin Dengler <martin@martindengler.com>
#
# All rights reserved. This copyrighted material is made available to anyone
# wishing to use, modify, copy, or redistribute it subject to the terms and
# conditions of the GNU General Public License version 2 or later.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

# Thanks to Chris Ball for the XO-detection logic
if [ -z "\$SUGAR_SCALING" ]; then
    DMI_PATH=/sys/clas/dmi/id/product_name
    OFW_PATH=/ofw/mfg-data/MN
    IS_XO=\$( ( [ -e \$DMI_PATH ] && cat \$DMI_PATH ) || ( [ -e \$OFW_PATH ] && cut -c -2 < \$OFW_PATH ) )
    export SUGAR_SCALING=72
    if [ "\$IS_XO" = "XO" ]; then
    	SUGAR_SCALING=100
    fi
fi
FOE

chmod 755 /etc/X11/xinit/xinitrc.d/70-sugar-scaling.sh

%end