]> git.pld-linux.org Git - packages/childsplay.git/blob - childsplay.spec
36fc55f540c19b47a8400b46e2179dc716e45af4
[packages/childsplay.git] / childsplay.spec
1
2 %define plugins_ver 0.80.3
3 Summary:        Games for children with plugins
4 Summary(pl):    Gry dla dzieci z wtyczkami
5 Name:           childsplay
6 Version:        0.81.1
7 Release:        1
8 License:        GPL v2
9 Group:          X11/Applications/Games
10 Source0:        http://dl.sourceforge.net/childsplay/%{name}-%{version}.tgz
11 # Source0-md5:  fc7497ba05c242f7eaf4c8898aff3043
12 Source1:        http://dl.sourceforge.net/childsplay/%{name}_plugins-%{plugins_ver}.tgz
13 # Source1-md5:  7ccaffb34f191af3f8cd945c7fbc0652
14 Patch0:         %{name}-install.patch
15 URL:            http://childsplay.sourceforge.net/
16 %pyrequires_eq  python-modules
17 Requires:       python-pygame >= 1.6
18 BuildArch:      noarch
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 Childsplay is a 'suite' of educational games for young children, like
23 gcompris, but without the overkill of C/C++ and the GNOME environment.
24 Also the use of the SDL libraries makes smooth animation and the
25 playing of sound very easy.
26
27 %description -l pl
28 Childsplay to zestaw gier edukacyjnych dla ma³ych dzieci, podobnie do
29 gcompris. Jest jednak napisana bez narzutu C/C++ i ¶rodowiska GNOME -
30 w Pythonie, z u¿yciem biblioteki SDL, co czyni animacje p³ynnymi i
31 odtwarzanie d¼wiêku bardzo ³atwym.
32
33 %prep
34 %setup -q -a1
35 %patch0 -p1
36
37 cat <<'EOF' >childsplay.sh
38 #!/bin/sh
39 exec python %{_datadir}/childsplay/childsplay.pyc $@
40 EOF
41
42 cat <<'EOF' >BASEPATH.py
43 BASEPATH = "%{_prefix}"
44 EXECDIR = "%{_bindir}"
45 LOCALEDIR = "%{_datadir}/locale"
46 ASSETMLDIR = "%{_datadir}/assetml"
47 SCOREDIR = "/var/games/"
48 SCOREFILE = SCOREDIR + "childsplay.score"
49 DOCDIR =  "%{_docdir}/childsplay"
50 MANDIR = "%{_mandir}/man6"
51 CPDIR = "%{_datadir}/childsplay"
52 SHAREDIR = CPDIR
53 BINDIR = "%{_bindir}/games"
54 LIBDIR = CPDIR + "/lib"
55 MODULESDIR = LIBDIR
56 SHARELIBDATADIR = SHAREDIR + "/lib"
57 SHAREDATADIR = SHAREDIR + "/Data"
58 RCDIR = SHARELIBDATADIR + "/ConfigData"
59 CHILDSPLAYRC = "childsplayrc"
60 HOME_DIR_NAME = ".childsplayrc"
61 EOF
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65
66 install -d $RPM_BUILD_ROOT%{_datadir}{/%{name}/lib/{ConfigData,MemoryData},locale,assetml} \
67         $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man6,/var/games}
68
69 install -Dp childsplay.sh $RPM_BUILD_ROOT%{_bindir}/childsplay
70 gzip -dc man/childsplay.6.gz >$RPM_BUILD_ROOT%{_mandir}/man6/childsplay.6
71
72 cp -fr Data/childsplay.score $RPM_BUILD_ROOT/var/games/%{name}.score
73 cp -fr *.py $RPM_BUILD_ROOT%{_datadir}/%{name}
74 cp -fr Data/ $RPM_BUILD_ROOT%{_datadir}/%{name}
75 cp -fr lib $RPM_BUILD_ROOT%{_datadir}/%{name}
76 cp -fr locale $RPM_BUILD_ROOT%{_datadir}
77 cp -fr assetml $RPM_BUILD_ROOT%{_datadir}
78
79 cd childsplay_plugins-%{plugins_ver}
80 cp -fr lib/* $RPM_BUILD_ROOT%{_datadir}/%{name}/lib
81 cp -fr Data/*.icon.png $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/icons
82 cp -fr Data/AlphabetSounds $RPM_BUILD_ROOT%{_datadir}/%{name}/Data
83 cp -fr assetml/childsplay $RPM_BUILD_ROOT%{_datadir}/assetml
84 %{__python} add-score.py $RPM_BUILD_ROOT/var/games/ "Packid,Numbers"
85 cd ..
86
87 %py_comp $RPM_BUILD_ROOT%{_datadir}/%{name}
88 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{name}
89
90 find $RPM_BUILD_ROOT%{_datadir} -name "*.py" | xargs rm
91
92 %find_lang %{name}
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %files -f %{name}.lang
98 %defattr(644,root,root,755)
99 %doc README* doc/README* doc/Changelog
100 %{_mandir}/man6/*
101 %{_datadir}/%{name}
102 %{_datadir}/assetml/*
103 %attr(664,root,games) %config(noreplace) %verify(not md5 mtime size) /var/games/%{name}.score
104 %attr(2755,root,games) %{_bindir}/childsplay
This page took 0.054168 seconds and 3 git commands to generate.