2 %define plugins_ver 0.80.3
3 Summary: Games for children with plugins
4 Summary(pl): Gra dla dzieci z wtyczkami
8 Group: X11/Applications/Games
9 Source0: http://dl.sourceforge.net/childsplay/%{name}-%{version}.tgz
10 # Source0-md5: fc7497ba05c242f7eaf4c8898aff3043
11 Source1: http://dl.sourceforge.net/childsplay/%{name}_plugins-%{plugins_ver}.tgz
12 # Source1-md5: 7ccaffb34f191af3f8cd945c7fbc0652
13 Patch0: %{name}-install.patch
15 URL: http://childsplay.sourceforge.net/
16 %pyrequires_eq python-modules
17 Requires: python-pygame >= 1.6
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 Childsplay is a 'suite' of educational games for young children, like
23 gcompris, but without the overkill of c/c++ and the gnome environ.
24 Also the use of the SDL libraries makes smooth animation and the
25 playing of sound very easy.
28 Childsplay jest gra edukacyjna dla dzieci podobna do gcompris. Jest
29 jednak napisana w pythonie, uzywa biblioteki SDL.
36 cat <<'EOF' >childsplay.sh
38 exec python %{_datadir}/childsplay/childsplay.pyc $@
41 cat <<'EOF' >BASEPATH.py
42 BASEPATH = "%{_prefix}"
43 EXECDIR = "%{_bindir}"
44 LOCALEDIR = "%{_datadir}/locale"
45 ASSETMLDIR = "%{_datadir}/assetml"
46 SCOREDIR = "/var/games/"
47 SCOREFILE = SCOREDIR + "childsplay.score"
48 DOCDIR = "%{_docdir}/childsplay"
49 MANDIR = "%{_mandir}/man6"
50 CPDIR = "%{_datadir}/childsplay"
52 BINDIR = "%{_bindir}/games"
53 LIBDIR = CPDIR + "/lib"
55 SHARELIBDATADIR = SHAREDIR + "/lib"
56 SHAREDATADIR = SHAREDIR + "/Data"
57 RCDIR = SHARELIBDATADIR + "/ConfigData"
58 CHILDSPLAYRC = "childsplayrc"
59 HOME_DIR_NAME = ".childsplayrc"
66 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_datadir}{/%{name}/lib/{ConfigData,MemoryData},locale,assetml} \
69 $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man6,/var/games}
71 install -Dp childsplay.sh $RPM_BUILD_ROOT%{_bindir}/childsplay
72 install -Dp man/childsplay.6.gz $RPM_BUILD_ROOT%{_mandir}/man6/childsplay.6.gz
74 cp -fr Data/childsplay.score $RPM_BUILD_ROOT/var/games/%{name}.score
75 cp -fr *.py $RPM_BUILD_ROOT%{_datadir}/%{name}/
76 cp -fr Data/ $RPM_BUILD_ROOT%{_datadir}/%{name}/
77 cp -fr lib $RPM_BUILD_ROOT%{_datadir}/%{name}/
78 cp -fr locale $RPM_BUILD_ROOT%{_datadir}/
79 cp -fr assetml $RPM_BUILD_ROOT%{_datadir}/
81 cd childsplay_plugins-%{plugins_ver}/
82 cp -fr lib/* $RPM_BUILD_ROOT%{_datadir}/%{name}/lib/
83 cp -fr Data/*.icon.png $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/icons/
84 cp -fr Data/AlphabetSounds $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/
85 cp -fr assetml/childsplay $RPM_BUILD_ROOT%{_datadir}/assetml/
86 %{__python} add-score.py $RPM_BUILD_ROOT/var/games/ "Packid,Numbers"
89 %py_comp $RPM_BUILD_ROOT%{_datadir}/%{name}
90 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{name}
92 find $RPM_BUILD_ROOT%{_datadir} -name "*.py" | xargs rm
97 rm -rf $RPM_BUILD_ROOT
99 %files -f %{name}.lang
100 %defattr(644,root,root,755)
101 %doc README* doc/README* doc/Changelog
104 %{_datadir}/assetml/*
105 %attr(664,root,games) %config(noreplace) %verify(not md5 mtime size) /var/games/%{name}.score
106 %attr(2755,root,games) %{_bindir}/childsplay