scratch/scratch.spec

133 lines
6.1 KiB
RPMSpec

Name: scratch
Version: 1.4.0.7
Release: 4mamba
Summary: A programming language aimed to educational pourposes
Group: Graphical Desktop/Applications/Educational
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://scratch.mit.edu/
Source: http://download.scratch.mit.edu/scratch-%{version}.src.tar.gz
Source1: scratch.appdata.xml
Source2: 50-wedo.rules
Patch0: scratch-1.4.0.7-desktopfile-semicolon.patch
Patch1: scratch-1.4.0.7-use-system-squeak.patch
License: GPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires: squeak-vm
%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.
#% debug_package
%prep
%setup -q -n %{name}-%{version}.src
# From Fedora
%patch 0 -p1 -b .desktopfile-semicolon
%patch 1 -p1 -b .use-system-squeak
%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
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/
install -m 755 -d %{buildroot}%{_udevrulesdir}
install -m 644 %{SOURCE2} %{buildroot}%{_udevrulesdir}/
mkdir -p %{buildroot}%{_datadir}/appdata
cp -a %{SOURCE1} %{buildroot}%{_datadir}/appdata/
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/scratch
%{_datadir}/applications/scratch.desktop
%{_datadir}/appdata/scratch.appdata.xml
%{_datadir}/mime/packages/scratch.xml
%{_udevrulesdir}/50-wedo.rules
%{_datadir}/scratch/Scratch.image
%{_datadir}/scratch/Scratch.ini
%{_datadir}/scratch/Help/*
%{_datadir}/scratch/locale/*
%{_datadir}/scratch/Media/*
%{_datadir}/scratch/Projects/*
%{_datadir}/icons/hicolor/*/apps/scratch.png
%{_datadir}/icons/hicolor/*/mimetypes/gnome-mime-application-x-scratch-project.png
%{_mandir}/man1/scratch.1*
%changelog
* Wed Dec 11 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4.0.7-4mamba
- rebuilt with squeak-vm 4.10.2.2614
* Thu Nov 22 2012 openmamba WebBuild System <webbuild@openmamba.org> 1.4.0.7-3mamba
- fixed permissions and specfile
* Wed Nov 21 2012 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 1.4.0.7-2mamba
- fixed permissions
* Wed Nov 21 2012 openmamba WebBuild System <webbuild@openmamba.org> 1.4.0.7-1mamba
- package created by ercolinux using the webbuild interface