Last active
June 9, 2020 11:48
-
-
Save alanszlosek/8eb03f5a3915e1e48fee61531e369355 to your computer and use it in GitHub Desktop.
Build script for Sugar under Debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# install git if not present | |
[ ! -e /usr/bin/git ] && sudo apt install -y git | |
# clone the sugar modules | |
for x in sugar{-datastore,-artwork,-toolkit-gtk3,} gwebsockets; do | |
if [ ! -e ${x} ]; then | |
git clone https://github.com/sugarlabs/$x | |
fi | |
done | |
for x in sugar{-datastore,-artwork,-toolkit-gtk3,}; do | |
cd ${x} | |
git checkout tags/v0.117 | |
cd .. | |
done | |
sudo apt install xserver-xorg lightdm git rsync libgtk2.0-dev libgtk-3-dev libglib2.0-dev libcairo2-dev python3-empy icon-naming-utils dh-autoreconf gnome-common x11-apps python-all-dev python3-all-dev libgtk-3-dev libgdk-pixbuf2.0-dev libsm-dev libice-dev librsvg2-dev libxfixes-dev libxi-dev libx11-dev gettext intltool libxml-parser-perl x11proto-core-dev libasound2-dev libgirepository1.0-dev linux-libc-dev python-setuptools python3-setuptools python-six python-decorator python-dbus python-cairo python-dateutil python-gi-cairo python-pygame python3-six python3-decorator python3-dbus python3-cairo gir1.2-telepathyglib-0.12 python3-xapian python3-dateutil python3-gi-cairo python3-pygame gir1.2-gstreamer-1.0 gir1.2-wnck-3.0 gir1.2-soup-2.4 gir1.2-gtksource-3.0 gir1.2-webkit2-4.0 gir1.2-xkl-1.0 gir1.2-upowerglib-1.0 gir1.2-vte-2.91 gir1.2-evince-3.0 gir1.2-gst-plugins-base-1.0 gir1.2-nm-1.0 gir1.2-abi-3.0 gir1.2-gudev-1.0 network-manager modemmanager avahi-autoipd dbus-x11 upower lsb-release tzdata ethtool openssh-client gvfs xdg-user-dirs fonts-dejavu-core mobile-broadband-provider-info policykit-1 metacity telepathy-mission-control-5 openssh-client telepathy-salut telepathy-gabble upower pulseaudio gstreamer1.0-pulseaudio gstreamer1.0-espeak gstreamer1.0-plugins-good unzip python-pip python3-pip | |
# build - sugar-artwork | |
sudo apt install python-empy python3-empy | |
# OR sudo pip install empy | |
pwd | |
cd sugar-artwork && ( | |
./autogen.sh --prefix=/usr | |
make | |
sudo make install | |
echo ok | |
) > ../install-sugar-artwork.log 2>&1 | |
cd .. | |
# build - sugar-toolkit-gtk3 | |
pwd | |
cd sugar-toolkit-gtk3 && ( | |
./autogen.sh --prefix /usr --with-python3 | |
make | |
sudo make install | |
sudo rsync -r /usr/lib/python3.7/site-packages/sugar3 /usr/lib/python3.7/dist-packages/ | |
echo ok | |
) > ../install-sugar-toolkit-gtk3.log 2>&1 | |
cd .. | |
# build - sugar-datastore | |
cd sugar-datastore && ( | |
./autogen.sh --prefix /usr | |
make | |
sudo make install | |
sudo rsync -r /usr/lib/python3.7/site-packages/carquinyol /usr/lib/python3.7/dist-packages/carquinyol | |
echo ok | |
) > ../install-sugar-datastore.log 2>&1 | |
cd .. | |
# build - sugar | |
cd sugar && ( | |
./autogen.sh --prefix /usr | |
make | |
sudo make install | |
sudo rm -rf /usr/lib/python3.7/dist-packages/jarabe | |
sudo mv /usr/lib/python3.7/site-packages/jarabe /usr/lib/python3.7/dist-packages/ | |
echo ok | |
) > ../install-sugar.log 2>&1 | |
cd .. | |
# build - gwebsockets | |
cd gwebsockets && ( | |
git clean -dfx | |
python3 setup.py build | |
sudo python3 setup.py install --prefix /usr | |
sudo cp -pr gwebsockets /usr/lib/python3.7/dist-packages/ | |
echo ok | |
) > install-gwebsockets.log 2>&1 | |
cd .. | |
# prepare for activities | |
mkdir -p sugar-activities | |
function clone { | |
P=sugar-activities/$2 | |
if [ ! -e $P ]; then | |
git clone --depth 2 $1 $P | |
fi | |
} | |
# clone demonstration activities, the fructose set | |
clone https://github.com/sugarlabs/browse-activity Browse.activity | |
clone https://github.com/sugarlabs/sugarlabs-calculate Calculate.activity | |
clone https://github.com/sugarlabs/chat Chat.activity | |
clone https://github.com/sugarlabs/imageviewer-activity ImageViewer.activity | |
clone https://github.com/sugarlabs/jukebox-activity Jukebox.activity | |
clone https://github.com/sugarlabs/log-activity Log.activity | |
clone https://github.com/sugarlabs/Pippy Pippy.activity | |
clone https://github.com/sugarlabs/read-activity Read.activity | |
clone https://github.com/sugarlabs/record-activity Record.activity | |
clone https://github.com/sugarlabs/terminal-activity Terminal.activity | |
clone https://github.com/sugarlabs/turtleart-activity TurtleBlocks.activity | |
clone https://github.com/sugarlabs/write-activity Write.activity | |
# clone assorted other activities, the honey set | |
clone https://github.com/sugarlabs/memorize-activity Memorize.activity | |
# clone custom activities | |
#clone https://github.com/my/repository.git My.activity | |
# replace all installed activities with sugar activities from source | |
# side effect: debian package version mismatch | |
( | |
sudo mkdir -p /usr/share/sugar/activities | |
cd sugar-activities | |
for ACTIVITY in *.activity; do | |
echo $ACTIVITY | |
cd $ACTIVITY | |
python3 setup.py genpot | |
python3 setup.py build | |
python3 setup.py fix_manifest | |
# temporary, trying to fix locales | |
cd locale | |
ln -s ./en_US ./en_US.UTF-8 | |
cd ../.. | |
sudo rm -rf /usr/share/sugar/activities/$ACTIVITY | |
sudo ln -s /home/user/documents/sugar-activities/$ACTIVITY /usr/share/sugar/activities/$ACTIVITY | |
done | |
) > install-sugar-activities.log 2>&1 | |
# don't automatically launch X because there are likely to be issues | |
# if testing in a VM, having lightdm always up can cause issues | |
sudo systemctl disable lightdm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment