[scratch] Oh hey it would be useful if I actually commit all this and build it and stuff.

Matthew Miller mattdm at fedoraproject.org
Sat Jun 15 16:31:28 UTC 2013


commit 941a48e10a7ca394b89a6941fde1ab34b8a0b952
Author: Matthew Miller <mattdm at mattdm.org>
Date:   Sat Jun 15 12:30:46 2013 -0400

    Oh hey it would be useful if I actually commit all this and build it and stuff.

 .gitignore                                  |    2 +
 scratch-1.4.0.6-desktopfile-semicolon.patch |    8 +
 scratch-1.4.0.7-use-fedora-squeak.patch     |   18 ++
 scratch.spec                                |  308 +++++++++++++++++++++++++++
 sources                                     |    2 +
 5 files changed, 338 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..0e9f8af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/scratch-1.4.0.7.src.tar.gz
+/SqueakV2.sources.gz
diff --git a/scratch-1.4.0.6-desktopfile-semicolon.patch b/scratch-1.4.0.6-desktopfile-semicolon.patch
new file mode 100644
index 0000000..b013193
--- /dev/null
+++ b/scratch-1.4.0.6-desktopfile-semicolon.patch
@@ -0,0 +1,8 @@
+--- scratch-1.4.0.6.src/src/scratch.desktop-semicolon	2012-09-10 13:04:14.075940196 -0400
++++ scratch-1.4.0.6.src/src/scratch.desktop	2012-09-10 13:04:18.345846641 -0400
+@@ -6,4 +6,4 @@
+ Type=Application
+ Icon=scratch
+ Categories=Development;
+-MimeType=application/x-scratch-project
++MimeType=application/x-scratch-project;
diff --git a/scratch-1.4.0.7-use-fedora-squeak.patch b/scratch-1.4.0.7-use-fedora-squeak.patch
new file mode 100644
index 0000000..96fa801
--- /dev/null
+++ b/scratch-1.4.0.7-use-fedora-squeak.patch
@@ -0,0 +1,18 @@
+diff -ur scratch-1.4.0.6.src.orig/src/scratch scratch-1.4.0.6.src/src/scratch
+--- scratch-1.4.0.6.src.orig/src/scratch	2011-07-01 18:21:32.000000000 -0400
++++ scratch-1.4.0.6.src/src/scratch	2012-09-10 09:39:20.555278005 -0400
+@@ -4,11 +4,9 @@
+ # Original Author: Bert Freudenberg
+ # Adapted by:      Miriam Ruiz
+ 
+-VM_VERSION=`find /usr/lib/squeak/ -name "squeakvm" -type f|cut -f5 -d"/"`
+-SQ_DIR=/usr/lib/squeak/$VM_VERSION
+-VM="$SQ_DIR/squeakvm"
+-VMOPTIONS="-encoding UTF-8 -vm-display-x11 -xshm -plugins /usr/lib/scratch/Plugins/:$SQ_DIR/"
+-IMAGE="/usr/lib/scratch/Scratch.image"
++VM="/usr/bin/squeak"
++VMOPTIONS="-encoding UTF-8"
++IMAGE="/usr/share/scratch/Scratch.image"
+ IMOPTIONS=""
+ DOCUMENT=""
+ WRAPPER=""
diff --git a/scratch.spec b/scratch.spec
new file mode 100644
index 0000000..b37ed1b
--- /dev/null
+++ b/scratch.spec
@@ -0,0 +1,308 @@
+Name:           scratch
+Version:        1.4.0.7
+Release:        5%{?dist}
+Summary:        Programming language learning environment for stories, games, music and art
+
+Group:          Development/Languages
+License:        GPLv2 and ASL 2.0 and MIT and CC-BY-SA
+URL:            http://scratch.mit.edu
+Source0:        http://download.scratch.mit.edu/%{name}-%{version}.src.tar.gz
+# The following source file is not used in the build process, but together
+# with Scratch.image and src/Scratch.changes comprises the preferred means
+# of modification -- see the included README. This file is under the MIT
+# and Apache 2.0 licenses.
+Source1:        http://ftp.squeak.org/2.0/SqueakV2.sources.gz
+Patch0:         scratch-1.4.0.7-use-fedora-squeak.patch
+Patch1:         scratch-1.4.0.6-desktopfile-semicolon.patch
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:	noarch
+
+BuildRequires: desktop-file-utils
+
+Requires:       scratch-image
+Requires:       scratch-media, scratch-projects
+Requires:       scratch-help, scratch-i18n
+
+
+%description
+Scratch is a programming language that makes it easy to create your own
+interactive stories, animations, games, music, and art -- and share your
+creations on the web.
+
+As young people create and share Scratch projects, they learn important
+mathematical and computational ideas, while also learning to think
+creatively, reason systematically, and work collaboratively.
+
+This package brings in all of the various subpackages which comprise the
+full Scratch distribution.
+
+
+%package image
+Summary: The Scratch programming environment
+License: GPLv2 and ASL 2.0 and MIT
+Requires: squeak-vm >= 4.10.2.2593
+BuildArch: noarch
+
+%description image
+Scratch is a programming language that makes it easy to create your own
+interactive stories, animations, games, music, and art -- and share your
+creations on the web.
+
+This package contains the core Scratch programming environment.
+
+
+%package help
+Summary: Documentation for the Scratch programming language
+License: CC-BY-SA
+BuildArch: noarch
+
+%description help
+This package contains HTML and PDF documentation for scratch. The HTML
+documentation is referenced in the Scratch menu, and the PDFs are linked
+from that.
+
+
+%package media
+Summary: The standard distribution of sprites and media for Scratch
+License: CC-BY-SA
+BuildArch: noarch
+
+%description media
+This package contains the standard collection of images and sounds for the
+Scratch programming language.
+
+
+%package projects
+Summary: The standard distribution of Scratch projects
+License: CC-BY-SA
+BuildArch: noarch
+
+%description projects
+This package contains the standard collection of sample projects for the
+Scratch programming language.
+
+
+%package i18n
+Summary: Translations for the Scratch programming environment
+License: GPLv2
+BuildArch: noarch
+
+%description i18n
+This package contains international support for the Scratch programming
+environment. If it is not installed, Scratch will only be available in
+English
+
+
+%prep
+%setup -q -n %{name}-%{version}.src
+%patch0 -p1
+%patch1 -p1
+
+
+%build
+# since the Squeak VM version 4.10.2.2593 and greater includes all the
+# plugins previously included as part of Scratch, we don't need to build
+# anything here.
+
+
+%install
+rm -rf %{buildroot} 
+
+install -m 755 -d %{buildroot}%{_datadir}/%{name}
+install -m 644 Scratch.image %{buildroot}%{_datadir}/%{name}/
+install -m 644 Scratch.ini %{buildroot}%{_datadir}/%{name}/
+
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Help/en/images
+install -m 644 Help/en/*.pdf %{buildroot}%{_datadir}/%{name}/Help/en/
+install -m 644 Help/en/*.html %{buildroot}%{_datadir}/%{name}/Help/en/
+install -m 644 Help/en/*.gif %{buildroot}%{_datadir}/%{name}/Help/en/
+install -m 644 Help/en/images/*.gif %{buildroot}%{_datadir}/%{name}/Help/en/images/
+
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/locale
+install -m 644 locale/* %{buildroot}%{_datadir}/%{name}/locale/
+
+cp -R Media  %{buildroot}%{_datadir}/%{name}/
+
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Projects/Animation
+install -m 644 Projects/Animation/*.sb %{buildroot}%{_datadir}/%{name}/Projects/Animation/
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Projects/Games
+install -m 644 Projects/Games/*.sb %{buildroot}%{_datadir}/%{name}/Projects/Games/
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Projects/Greetings
+install -m 644 Projects/Greetings/*.sb %{buildroot}%{_datadir}/%{name}/Projects/Greetings/
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Projects/Interactive\ Art
+install -m 644 Projects/Interactive\ Art/*.sb %{buildroot}%{_datadir}/%{name}/Projects/Interactive\ Art/
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Projects/Music\ and\ Dance
+install -m 644 Projects/Music\ and\ Dance/*.sb %{buildroot}%{_datadir}/%{name}/Projects/Music\ and\ Dance/
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Projects/Names
+install -m 644 Projects/Names/*.sb %{buildroot}%{_datadir}/%{name}/Projects/Names/
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Projects/Sensors\ and\ Motors
+install -m 644 Projects/Sensors\ and\ Motors/*.sb %{buildroot}%{_datadir}/%{name}/Projects/Sensors\ and\ Motors/
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Projects/Simulations
+install -m 644 Projects/Simulations/*.sb %{buildroot}%{_datadir}/%{name}/Projects/Simulations/
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Projects/Speak\ Up
+install -m 644 Projects/Speak\ Up/*.sb %{buildroot}%{_datadir}/%{name}/Projects/Speak\ Up/
+install -m 755 -d %{buildroot}%{_datadir}/%{name}/Projects/Stories
+install -m 644 Projects/Stories/*.sb %{buildroot}%{_datadir}/%{name}/Projects/Stories/
+
+install -m 755 -d %{buildroot}%{_bindir}/
+install -m 755 src/scratch %{buildroot}%{_bindir}/
+
+install -m 755 -d %{buildroot}%{_mandir}/man1
+install -m 644 src/man/scratch.1.gz %{buildroot}%{_mandir}/man1/
+
+install -m 755 -d %{buildroot}%{_datadir}/applications
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications src/%{name}.desktop
+
+install -m 755 -d %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
+install -m 644 src/icons/48x48/scratch.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/
+install -m 755 -d %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
+install -m 644 src/icons/128x128/scratch.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
+install -m 755 -d %{buildroot}%{_datadir}/icons/hicolor/48x48/mimetypes
+install -m 644 src/icons/48x48/gnome-mime-application-x-scratch-project.png %{buildroot}%{_datadir}/icons/hicolor/48x48/mimetypes/
+install -m 755 -d %{buildroot}%{_datadir}/icons/hicolor/128x128/mimetypes
+install -m 644 src/icons/128x128/gnome-mime-application-x-scratch-project.png %{buildroot}%{_datadir}/icons/hicolor/128x128/mimetypes/
+
+install -m 755 -d %{buildroot}%{_datadir}/mime/packages
+install -m 644 src/%{name}.xml %{buildroot}%{_datadir}/mime/packages/
+
+
+%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc KNOWN-BUGS ACKNOWLEDGEMENTS LICENSE NOTICE TRADEMARK_POLICY gpl-2.0.txt
+%{_bindir}/%{name}
+%{_mandir}/man1/%{name}*.1*
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/mime/packages/%{name}.xml
+%{_datadir}/icons/hicolor/48x48/apps/*
+%{_datadir}/icons/hicolor/48x48/mimetypes/*
+%{_datadir}/icons/hicolor/128x128/apps/*
+%{_datadir}/icons/hicolor/128x128/mimetypes/*
+
+%files image
+%defattr(-,root,root,-)
+%doc LICENSE gpl-2.0.txt
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/Scratch.image
+%{_datadir}/%{name}/Scratch.ini
+
+%files help
+%defattr(-,root,root,-)
+%doc LICENSE
+%dir %{_datadir}/%{name}/Help
+%{_datadir}/%{name}/Help/*
+
+%files media
+%defattr(-,root,root,-)
+%doc LICENSE
+%dir %{_datadir}/%{name}/Media
+%{_datadir}/%{name}/Media/*
+
+%files projects
+%defattr(-,root,root,-)
+%doc LICENSE
+%dir %{_datadir}/%{name}/Projects
+%{_datadir}/%{name}/Projects/*
+
+%files i18n
+%defattr(-,root,root,-)
+%doc LICENSE gpl-2.0.txt
+%{_datadir}/%{name}/locale
+
+
+%changelog
+* Sat Nov 24 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.7-5
+- delete SQ_DIR code from scratch launch script -- not needed since
+  we're using distro-provided packages and we know where our own stuff
+  lives.
+
+* Wed Nov  7 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.7-4
+- new squeak-vm now includes the plugins needed here (including the
+  Scratch plugin), so we don't need to build them here.
+- update startup script to not refer to plugins from this package 
+- move xshm change to single fedora squeak patch, for simplicity
+- move startup script and icons to main package
+- remove pulseaudio hack since that should now just work
+
+* Fri Sep 28 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.7-3
+- xshm extension has been reported to cause problems with newer squeak,
+  and definitely breaks remote use. Does not appear to give a noticeable
+  performance benefit, so let's not use it.
+
+
+* Fri Sep 28 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.7-2
+- add source file and license info for squeak vm
+- use buildroot macro consistently
+- add rpm scripts for icon cache refresh
+- install desktop file properly
+
+* Fri Sep 14 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.7-1
+- update to 1.4.0.7, which removes the mp3 issue thanks to upstream
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-15
+- work around possible missing pulse plugin for squeak
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-14
+- right name for the camera plugin
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-13
+- license files for all!
+- proper license for different subpackages
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-12
+- whoops forgot to require the camera plugin
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-11
+- use santized source file (no included pre-built binaries)
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-10
+- fix whine about invalid desktop file due to missing ;
+- de-dot the summaries
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-9
+- missing defattr -- whoops
+- put docs in both image and main wrapper package
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-8
+- delete mp3s since they won't work without support
+- remove binary plugins in prep stage
+- move more things to noarch subpackages -- now only plugins and
+  main "wrapper" package are arch-specific
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-7
+- split plugins into subpackages
+- split help and media into subpackages
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-5
+- remove MIDI plugin, which is part of the main squeak vm package
+- remove MP3 plugin, which is a) a binary in the source distribution,
+  b) missing source, and c) not allowed in Fedora
+
+* Mon Sep 10 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-4
+- update layout to deal with arch issues
+- set cflags; get proper debuginfo packages
+
+* Fri Sep  7 2012 Matthew Miller <mattdm[@]mattdm.org> - 1.4.0.6-1
+- update to gplv2 version
+- tweak source filename and build dir to match upstream
+- update patch to point to system squeak vm
+
+* Mon Jan 17 2011 W. Michael Petullo <mike[@]flyn.org> - 1.4.0.1-1
+- Initial package
diff --git a/sources b/sources
index e69de29..205c04b 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+f948e9e6de3ec9c7c7b4cc2a1975eb5a  scratch-1.4.0.7.src.tar.gz
+80487895bb1d1cbfddc8736273cccc92  SqueakV2.sources.gz


More information about the scm-commits mailing list