cb49775
%define realname childsplay_sp
cb49775
%define alphabet_ver 0.8.5
cb49775
554f728
Name:           childsplay
cb49775
Version:        1.1
66adbe2
Release:        1%{?dist}
554f728
Summary:        Suite of educational games for young children
554f728
Group:          Amusements/Games
66adbe2
License:        GPLv3
cb49775
URL:            http://www.schoolsplay.org/
66adbe2
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
554f728
Source1:        childsplay.desktop
cb49775
Source2:        childsplay.README.RPM
cb49775
Source10:       alphabet_sounds_ca-0.8.5.tgz
cb49775
Source11:       alphabet_sounds_de-0.8.5.tgz
cb49775
Source12:       alphabet_sounds_es-0.8.5.tgz
cb49775
Source13:       alphabet_sounds_fr-0.8.5.tgz
cb49775
Source14:       alphabet_sounds_it-0.8.5.tgz
cb49775
Source15:       alphabet_sounds_nl-0.8.5.tgz
cb49775
Source16:       alphabet_sounds_ru-0.8.5.tgz
554f728
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
554f728
BuildArch:      noarch
554f728
BuildRequires:  desktop-file-utils
cb49775
Requires:       pygame
cb49775
Requires:       python-sqlalchemy
cb49775
Requires:       hicolor-icon-theme
5c8936d
Requires:       pyfribidi
554f728
cb49775
Provides:       childsplay_sp = %{version}-%{release}
cb49775
Provides:       childsplay_plugins <= 0.90
cb49775
Obsoletes:      childsplay_plugins = %{version}-%{release}
cb49775
cb49775
%global python_sitedir %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
cb49775
cb49775
554f728
%description
554f728
Childsplay is a suite of educational games for young children. It's written in
554f728
Python and uses the SDL-libraries. The aim is to be educational and at the same
554f728
time be fun to play.
554f728
554f728
Some activities make use of language dependent voice samples, these sounds are
554f728
shared with gcompris. For those you'll have to install the gcompris-sound
554f728
package for the languages you intend to use. For example gcompris-sound-en .
554f728
554f728
cb49775
%package alphabet_sounds_ca
cb49775
Summary:        Catalan alphabet sounds for Childsplay
cb49775
Group:          Amusements/Games
cb49775
Requires:       %{name} = %{version}-%{release}
cb49775
%description alphabet_sounds_ca
cb49775
Catalan alphabet sounds for Childsplay
cb49775
cb49775
cb49775
%package alphabet_sounds_de
cb49775
Summary:        German alphabet sounds for Childsplay
cb49775
Group:          Amusements/Games
cb49775
Requires:       %{name} = %{version}-%{release}
cb49775
%description alphabet_sounds_de
cb49775
German alphabet sounds for Childsplay
cb49775
cb49775
cb49775
%package alphabet_sounds_es
cb49775
Summary:        Spanish alphabet sounds for Childsplay
cb49775
Group:          Amusements/Games
cb49775
Requires:       %{name} = %{version}-%{release}
cb49775
%description alphabet_sounds_es
cb49775
Spanish alphabet sounds for Childsplay
cb49775
cb49775
cb49775
%package alphabet_sounds_fr
cb49775
Summary:        French alphabet sounds for Childsplay
cb49775
Group:          Amusements/Games
cb49775
Requires:       %{name} = %{version}-%{release}
cb49775
%description alphabet_sounds_fr
cb49775
French alphabet sounds for Childsplay
cb49775
cb49775
cb49775
%package alphabet_sounds_it
cb49775
Summary:        Italian alphabet sounds for Childsplay
cb49775
Group:          Amusements/Games
cb49775
Requires:       %{name} = %{version}-%{release}
cb49775
%description alphabet_sounds_it
cb49775
Italian alphabet sounds for Childsplay
cb49775
cb49775
cb49775
%package alphabet_sounds_nl
cb49775
Summary:        Dutch alphabet sounds for Childsplay
cb49775
Group:          Amusements/Games
cb49775
Requires:       %{name} = %{version}-%{release}
cb49775
%description alphabet_sounds_nl
cb49775
Dutch alphabet sounds for Childsplay
cb49775
cb49775
cb49775
%package alphabet_sounds_ru
cb49775
Summary:        Russian alphabet sounds for Childsplay
cb49775
Group:          Amusements/Games
cb49775
Requires:       %{name} = %{version}-%{release}
cb49775
%description alphabet_sounds_ru
cb49775
Russian alphabet sounds for Childsplay
cb49775
cb49775
554f728
%prep
cb49775
%setup -q -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16
554f728
# we don't use the buggy provided install
cb49775
rm setup.py
cb49775
rm `find alphabet_sounds_??-%{alphabet_ver} -name install.py`
cb49775
rm -rf po
554f728
# fixup the python scripts to call python directly and make them executable
cb49775
sed -i 's!/usr/bin/env python!%{_bindir}/python!' bin/%{name}
cb49775
#Fix a typo in the German sounds directory name
cb49775
mv alphabet_sounds_de-0.8.5/FlashCardSounds alphabet_sounds_de-0.8.5/FlashCardsSounds
cb49775
cp %{SOURCE2} README.RPM
cb49775
554f728
554f728
%build
cb49775
# setup.py is not really usable for our needs
cb49775
echo "## Automated file please do not edit" > SPBasePaths.py
cb49775
echo "# This module holds all the paths needed for %{name}." >> SPBasePaths.py
cb49775
echo "DOCDIR = '%{_datadir}/doc/%{name}-%{version}'" >> SPBasePaths.py
cb49775
echo "PYTHONCPDIR = '%{python_sitedir}/%{realname}'" >> SPBasePaths.py
cb49775
echo "BASEDIR = '%{_datadir}/%{realname}'" >> SPBasePaths.py
cb49775
echo "SHARELIBDATADIR = '%{_datadir}/%{realname}'" >> SPBasePaths.py
cb49775
echo "ALPHABETDIR = '%{_datadir}/%{realname}/alphabetsounds'" >> SPBasePaths.py
cb49775
echo "LOCALEDIR = '%{_datadir}/locale'" >> SPBasePaths.py
554f728
554f728
554f728
%install
554f728
rm -rf $RPM_BUILD_ROOT
cb49775
# setup.py is not really usable for our needs
554f728
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cb49775
mkdir -p $RPM_BUILD_ROOT%{python_sitedir}/%{realname}/lib
554f728
mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale
cb49775
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{realname}
cb49775
cb49775
cp -a bin/%{name}  $RPM_BUILD_ROOT%{_bindir}
cb49775
cb49775
cp -a lib/CPData $RPM_BUILD_ROOT%{_datadir}/%{realname}
cb49775
cp -a lib/SPData $RPM_BUILD_ROOT%{_datadir}/%{realname}
cb49775
cp -a alphabetsounds $RPM_BUILD_ROOT%{_datadir}/%{realname}
554f728
cp -a locale/* $RPM_BUILD_ROOT%{_datadir}/locale
554f728
cb49775
cp -a *.py $RPM_BUILD_ROOT%{python_sitedir}/%{realname}
cb49775
cp -a gui $RPM_BUILD_ROOT%{python_sitedir}/%{realname}
cb49775
cp -a lib/*.py $RPM_BUILD_ROOT%{python_sitedir}/%{realname}/lib
cb49775
cp -a ocempgui $RPM_BUILD_ROOT%{python_sitedir}/%{realname}
cb49775
cb49775
%find_lang %{realname}
554f728
554f728
# below is the desktop file and icon stuff.
554f728
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
554f728
desktop-file-install --vendor fedora            \
554f728
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
554f728
  %{SOURCE1}
cb49775
cb49775
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
cb49775
install -p -m 644 lib/SPData/menu/default/logo_cp_64x64.png \
cb49775
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
cb49775
cb49775
#Alphabet sounds
cb49775
for sounds in ca de es fr it nl ru
cb49775
do
cb49775
  cp -a alphabet_sounds_$sounds-%{alphabet_ver}/AlphabetSounds/$sounds $RPM_BUILD_ROOT%{_datadir}/%{realname}/alphabetsounds
cb49775
  cp -a alphabet_sounds_$sounds-%{alphabet_ver}/FlashCardsSounds/$sounds $RPM_BUILD_ROOT%{_datadir}/%{realname}/CPData/FlashcardsData/names
cb49775
done
554f728
554f728
554f728
%clean
554f728
rm -rf $RPM_BUILD_ROOT
554f728
554f728
554f728
%post
554f728
touch --no-create %{_datadir}/icons/hicolor || :
70c0f68
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
70c0f68
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
70c0f68
fi
554f728
554f728
%postun
554f728
touch --no-create %{_datadir}/icons/hicolor || :
70c0f68
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
70c0f68
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
70c0f68
fi
554f728
554f728
cb49775
%files -f %{realname}.lang
554f728
%defattr(-, root, root, -)
cb49775
%doc Changelog COPYING doc/* README README.RPM
554f728
%{_bindir}/%{name}
cb49775
%dir %{_datadir}/%{realname}
cb49775
%{_datadir}/%{realname}/SPData
cb49775
%{_datadir}/%{realname}/CPData/*.*
cb49775
%{_datadir}/%{realname}/CPData/BilliardData
cb49775
%{_datadir}/%{realname}/CPData/FallinglettersData
cb49775
%{_datadir}/%{realname}/CPData/FindsoundData
cb49775
%{_datadir}/%{realname}/CPData/FishtankData
cb49775
%{_datadir}/%{realname}/CPData/FlashcardsData/cards
cb49775
%{_datadir}/%{realname}/CPData/FlashcardsData/sounds
cb49775
%{_datadir}/%{realname}/CPData/FlashcardsData/names/en
cb49775
%{_datadir}/%{realname}/CPData/LMemoryData
cb49775
%{_datadir}/%{realname}/CPData/MemoryData
cb49775
%{_datadir}/%{realname}/CPData/PackidData
cb49775
%{_datadir}/%{realname}/CPData/PongData
cb49775
%{_datadir}/%{realname}/CPData/PuzzleData
cb49775
%{_datadir}/%{realname}/CPData/SoundmemoryData
cb49775
%{_datadir}/%{realname}/alphabetsounds/en
cb49775
%{python_sitedir}/%{realname}
554f728
%{_datadir}/applications/fedora-%{name}.desktop
a554640
%{_datadir}/icons/hicolor/*/apps/%{name}.png
554f728
554f728
cb49775
%files alphabet_sounds_ca
cb49775
%defattr(-, root, root, -)
cb49775
%doc  alphabet_sounds_ca-%{alphabet_ver}/copyright  alphabet_sounds_ca-%{alphabet_ver}/GPL-2
cb49775
%{_datadir}/%{realname}/CPData/FlashcardsData/names/ca
cb49775
%{_datadir}/%{realname}/alphabetsounds/ca
cb49775
cb49775
cb49775
%files alphabet_sounds_de
cb49775
%defattr(-, root, root, -)
cb49775
%doc  alphabet_sounds_de-%{alphabet_ver}/copyright  alphabet_sounds_de-%{alphabet_ver}/GPL-2
cb49775
%{_datadir}/%{realname}/CPData/FlashcardsData/names/de
cb49775
%{_datadir}/%{realname}/alphabetsounds/de
cb49775
cb49775
cb49775
%files alphabet_sounds_es
cb49775
%defattr(-, root, root, -)
cb49775
%doc  alphabet_sounds_es-%{alphabet_ver}/copyright  alphabet_sounds_es-%{alphabet_ver}/GPL-2
cb49775
%{_datadir}/%{realname}/CPData/FlashcardsData/names/es
cb49775
%{_datadir}/%{realname}/alphabetsounds/es
cb49775
cb49775
cb49775
%files alphabet_sounds_fr
cb49775
%defattr(-, root, root, -)
cb49775
%doc  alphabet_sounds_fr-%{alphabet_ver}/copyright  alphabet_sounds_fr-%{alphabet_ver}/GPL-2
cb49775
%{_datadir}/%{realname}/CPData/FlashcardsData/names/fr
cb49775
%{_datadir}/%{realname}/alphabetsounds/fr
cb49775
cb49775
cb49775
%files alphabet_sounds_it
cb49775
%defattr(-, root, root, -)
cb49775
%doc  alphabet_sounds_it-%{alphabet_ver}/copyright  alphabet_sounds_it-%{alphabet_ver}/GPL-2
cb49775
%{_datadir}/%{realname}/CPData/FlashcardsData/names/it
cb49775
%{_datadir}/%{realname}/alphabetsounds/it
cb49775
cb49775
cb49775
%files alphabet_sounds_nl
cb49775
%defattr(-, root, root, -)
cb49775
%doc  alphabet_sounds_nl-%{alphabet_ver}/copyright  alphabet_sounds_nl-%{alphabet_ver}/GPL-2
cb49775
%{_datadir}/%{realname}/CPData/FlashcardsData/names/nl
cb49775
%{_datadir}/%{realname}/alphabetsounds/nl
cb49775
cb49775
cb49775
%files alphabet_sounds_ru
cb49775
%defattr(-, root, root, -)
cb49775
%doc  alphabet_sounds_ru-%{alphabet_ver}/copyright  alphabet_sounds_ru-%{alphabet_ver}/GPL-2
cb49775
%{_datadir}/%{realname}/CPData/FlashcardsData/names/ru
cb49775
%{_datadir}/%{realname}/alphabetsounds/ru
cb49775
cb49775
554f728
%changelog
cb49775
* Sun Mar 29 2009 Johan Cwiklinski <johan AT x-tnd DOT be> 1.1-1
cb49775
- Upgrade to 1.1
cb49775
- Added localized alphabet sounds
cb49775
29e7680
* Thu Jan 17 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.90.2-1
29e7680
- New upstream version 0.90.2
29e7680
- Drop upstreamed replace-cfg patch
29e7680
66adbe2
* Sun Aug 26 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.90-1
66adbe2
- New upstream version 0.90, license changed to GPL version 3,
66adbe2
  no other changes.
66adbe2
70c0f68
* Mon Aug  6 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.85.1-3 
70c0f68
- Update License tag for new Licensing Guidelines compliance
70c0f68
5c8936d
* Thu Jun  7 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.85.1-2
5c8936d
- Add pyfribidi Requires for Hebrew support
5c8936d
99807fa
* Fri Dec 22 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.85.1-1
99807fa
- New upstream release 0.85.1
99807fa
cdebd6e
* Tue Oct 31 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.84.1-1
cdebd6e
- New upstream release 0.84.1
cdebd6e
- Install the (still used) assetml files under %%{_datadir}/%%{name} instead
cdebd6e
  of under %%{_datadir}/assetml, since we no longer ship libassetml
cdebd6e
1d24f23
* Fri Sep 22 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.83.1-1
1d24f23
- New upstream release 0.83.1
1d24f23
bb8cf16
* Wed Sep  6 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.83-2
bb8cf16
- Don't %%ghost the .pyo files (bug 205370)
bb8cf16
a554640
* Sun Aug 27 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.83-1
a554640
- New upstream version 0.83
a554640
f98cc17
* Thu May 11 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.81.8-3
f98cc17
- Fix not finding of initial/default childsplayrc file.
f98cc17
554f728
* Wed May 10 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.81.8-2
554f728
- Ghost .pyo files
554f728
- BR: desktop-file-utils
554f728
554f728
* Fri May  5 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.81.8-1
554f728
- Initial package