1 ################################################################################
3 # sugar.cygclass - for building Sugar Activities packages
5 # Part of cygport - Cygwin packaging application
6 # Copyright (C) 2006-2020 Cygport authors
7 # Provided by the Cygwin project <https://cygwin.com/>
9 # cygport is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # cygport is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with cygport. If not, see <https://www.gnu.org/licenses/>.
22 ################################################################################
24 #****ih* Cygclasses/sugar.cygclass
26 # The Sugar Learning Platform provides an alternative to traditional
27 # office/desktop software with a focus on education and ease of use,
28 # particularly for children. Sugar Activities (applications) are written
29 # in Python to ease both authorship and deployment.
31 # This cygclass provides functions for building Sugar Activities packages.
35 # python, sugar-toolkit
38 : ${ORIG_PN:=${PN#sugar-}}
42 #****io* sugar.cygclass/CATEGORY (sugar)
46 #****io* sugar.cygclass/SUMMARY (sugar)
48 SUMMARY="Sugar Desktop ${ORIG_PN} activity"
50 #****io* sugar.cygclass/DESCRIPTION (sugar)
52 DESCRIPTION="The award-winning Sugar Learning Platform promotes
53 collaborative learning through Sugar Activities that encourage critical
54 thinking, the heart of a quality education. Designed from the ground up
55 especially for children, Sugar offers an alternative to traditional
56 office-desktop software."
58 #****io* sugar.cygclass/HOMEPAGE (sugar)
60 HOMEPAGE="https://www.sugarlabs.org/"
63 #****iv* sugar.cygclass/SUGAR_TYPE
65 # Activities shipped by Sugar Labs are classified into one of two Taxonomies:
66 # "Fructose" (maintained by the Sugar developers) and "Honey" (maintained by
67 # third parties). If SUGAR_TYPE is defined as one of these two, then SRC_URI
68 # will be defined automatically.
70 # This variable is case-insensitive.
72 case "${SUGAR_TYPE,,}" in
74 SRC_URI="https://download.sugarlabs.org/sources/sucrose/fructose/${ORIG_PN}/${ORIG_PN}-${PV}.tar.bz2" ;;
75 honey) SRC_URI="https://download.sugarlabs.org/sources/honey/${ORIG_PN}/${ORIG_PN}-${PV}.tar.bz2" ;;
78 #****iI* sugar.cygclass/sugar_install
82 # Installs the Sugar activity into $D and byte-compiles all Python code.
85 [ -e setup.py ] || error "sugar_install: setup.py not found"
86 ${PYTHON} setup.py install --prefix=${D}/usr || error "setup.py install failed"
87 python_optimize /usr/share/sugar/activities
90 #****io* sugar.cygclass/src_compile (sugar)
92 # There is nothing to build, so this is empty.
96 #****io* sugar.cygclass/src_install (sugar)
104 readonly -f sugar_install