https://wiki.archlinux.org/api.php?action=feedcontributions&user=Kennym&feedformat=atomArchWiki - User contributions [en]2024-03-29T14:22:11ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Sugar&diff=159888Sugar2011-09-16T01:45:07Z<p>Kennym: Add Python-pygame note</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
{{i18n|Sugar}}<br />
<br />
A product of the [http://en.wikipedia.org/wiki/One_Laptop_per_Child OLPC] initiative, [http://en.wikipedia.org/wiki/Sugar_(GUI) Sugar] is a Desktop Environment akin to [[KDE]] and [[GNOME]], but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it.<br />
<br />
But wait..where art thou, O Sugar?<br />
<br />
That's right. To lead such a good life, you need at least some Sugar-related packages in at least [[AUR]].<br />
<br />
Sugar has a special [http://wiki.sugarlabs.org/go/Taxonomy Taxonomy] to name the parts of its system. The desktop itself constitute the '''glucose''' group. This is the basic system an activity can reasonably expect to be present when installing Sugar. But to really use the environment, you need activities. Basic and sample activities are part of '''fructose'''. Then, '''sucrose''' is constituted by both {{Codeline|glucose}} and {{Codeline|fructose}} and represents what should be distributed as a basic sugar desktop environment. Note that {{Codeline|ribose}} (the underlaying operating system) is here replaced by Arch.{{Codeline|Honey}} (the extra activities) are not currently provided in AUR but can be installed as shown in the [[#Building]] section.<br />
<br />
== Getting started: Glucose ==<br />
=== Building from AUR ===<br />
<br />
Install [http://aur.archlinux.org/packages.php?ID=32989 sugar] from the [[AUR]].<br />
<br />
=== Building a Bundle ===<br />
[http://wiki.sugarlabs.org/go/Development_Team/Jhbuild This] is a cool build system provided by the developers that allows one to download and build Sugar ''almost'' in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.<br />
<br />
The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the [[E17#Installing_E17_using_easy_e17.sh|easy-e17 script]], except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:<br />
<br />
pkgname=sugar-bundle<br />
pkgdesc="The Sugar environment and applications built with jhbuild"<br />
provides=('sugar-desktop') # as in provides=('e')<br />
conflicts=('sugar-desktop')<br />
<br />
But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:<br />
<br />
pkgname=sugar-toolkit<br />
pkgdesc="The Sugar environment toolkit"<br />
groups=('sugar-desktop' 'sugar-desktop-base')<br />
<br />
''Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)''<br />
<br />
=== Depedency tree===<br />
Below is the dependency tree of sugar 0.86<br />
|--sugar<br />
|--hicolor-icon-theme<br />
|--shared-mime-info<br />
|--metacity<br />
|--libwnck<br />
|--pygtksourceview2<br />
|--sugar-artwork<br />
|--python-xklavier<br />
| |--libxklavier<br />
| |--pygobject<br />
| |--gtk2<br />
|--sugar-toolkit<br />
|--alsa-lib<br />
|--gnome-python-desktop<br />
|--hippo-canvas<br />
| |--librsvg<br />
| |--gtk2<br />
| |--libcroco<br />
|--sugar-datastore<br />
| |--dbus-python<br />
| |--xapian-python-bindings<br />
| |--python-cjson<br />
| |--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--sugar-presence-service<br />
|--telepathy-gabble<br />
|--telepathy-salut<br />
|--python-telepathy<br />
|--sugar-base<br />
| |--pygobject<br />
| |--python-decorator<br />
|--gnome-python<br />
|--pygtk<br />
|--pyorbit<br />
|--libgnomeui<br />
|--libsm<br />
<br />
=== Building a Modular Group ===<br />
This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):<br />
<br />
# Syntax: pkgname .. :-> location + comment1 + comment2 ..<br />
<br />
espeak :-> [community]<br />
squeak :-> [unsupported]<br />
evince :-> [extra]<br />
pyabiword :-> [unsupported]<br />
python-cjson :-> [community]<br />
python-telepathy :-> [community]<br />
gstreamer0.10-espeak :-> [unsupported]<br />
olpcsound :-> [unsupported]<br />
telepathy-glib :-> [community]<br />
xulrunner :-> [extra]<br />
telepathy-gabble :-> [community]<br />
telepathy-salut :-> [community]<br />
hippo-canvas :-> [unsupported]<br />
<br />
== Activities ==<br />
<br />
=== Fructose ===<br />
<br />
All {{Codeline|fructose}} activities are available on the AUR. To install them, you may issue<br />
yaourt sugar-activity<br />
or equivalent and select the activities you want to install.<br />
Currently provided activities are<br />
browse<br />
calculate<br />
chat<br />
imageviewer<br />
jukebox<br />
log<br />
pippy<br />
read<br />
terminal<br />
turtleart<br />
write<br />
etoys<br />
<br />
=== Etoys ===<br />
<br />
{{Codeline|etoys}} is provided separately as it is part of glucose but also include the fructose activity. You may install it using<br />
yaourt -S etoys<br />
or an equivalent AUR helper.<br />
<br />
=== Building===<br />
<br />
Now you have a working Sugar environment, it is time to populate it with activities such as a browser, a calculator, an image viewer or games and toys. They almost all have the same building procedure, a {{Filename|setup.py}} that calls functions shipped with sugar. Below is a typical {{Filename|PKGBUILD}}:<br />
{{File|name=PKGBUILD|content=<br />
# Contributor: Name <name@mail.com><br />
pkgname=sugar-activity-calculate<br />
_realname=Calculate<br />
pkgver=30<br />
pkgrel=1<br />
pkgdesc="A calculator for Sugar."<br />
arch=('i686' 'x86_64')<br />
url="http://www.sugarlabs.org/"<br />
license=('GPL')<br />
groups=('sucrose' 'fructose')<br />
depends=('sugar')<br />
source=(http://download.sugarlabs.org/sources/sucrose/fructose/${_realname}/${_realname}-$pkgver.tar.bz2)<br />
md5sums=('011bd911516f27d05194320164c7dcd7')<br />
<br />
build() {<br />
cd "$srcdir/${_realname}-$pkgver"<br />
./setup.py install --prefix="$pkgdir/usr" &#124;&#124; return 1<br />
}<br />
# vim:set ts=2 sw=2 et:<br />
}}<br />
You may need {{Codeline|squeak}} to run some activities (like {{Codeline|etoys}}).<br />
<br />
===Notes===<br />
<br />
* Activity building procedure is not made for packaging and using {{Codeline|--prefix}} can be dangerous if the application uses this path internally. I think the correct way to do this would be to patch the installation procedure in {{Codeline|sugar}} so it accepts an argument such as {{Codeline|<nowiki>--destdir=</nowiki>}}.<br />
<br />
* I ''suggest'' that we prefix sugar activities packages in AUR with {{Codeline|sugar-activity-}}.<br />
<br />
* You may need to install {{Codeline|python-pygame}} if activities do not start up.</div>Kennym