1## tuxmath.spec.in - process with configure to substitute in PACKAGE
2## VERSION strings
3#
4# spec file for package tuxmath
5#
6# This file and all modifications and additions to the pristine
7# package are under the same license as the package itself.
8#
9
10
11Name:           tuxmath
12Obsoletes:      tuxmath = 2001.09.07
13Obsoletes: 	tuxmath_preview <= 2.0.3
14Provides:  	tuxmath_preview = 2.0.3
15%define         realname tuxmath
16%define         progname tuxmath
17Summary:        Tux Math - educational math game
18Version:        2.0.3
19Release:        1
20License:        GPL
21Group:          Amusements/Teaching/Mathematics
22Url:            http://tux4kids.alioth.debian.org/
23Vendor:         openSUSE-Education
24
25BuildRequires:  SDL_image-devel >= 1.2.2
26#BuildRequires:  SDL_ttf-devel > 2.0.8
27BuildRequires:  SDL-devel
28BuildRequires:  SDL_mixer-devel
29BuildRequires:  SDL_Pango-devel
30BuildRequires:  ImageMagick
31
32%if 0%{?suse_version}
33BuildRequires:  update-desktop-files
34BuildRequires:  fdupes
35%endif
36
37%if 0%{?fedora_version}
38BuildRequires:  desktop-file-utils
39%endif
40
41%if 0%{?mandriva_version}
42BuildRequires:  desktop-file-utils
43Requires(post): desktop-file-utils
44Requires(postun): desktop-file-utils
45%endif
46%if 0%{?mandriva_version} >= 2009
47BuildRequires: pulseaudio-esound-compat
48%endif
49
50Source0:        %realname-%version.tar.bz2
51
52BuildRoot:      %{_tmppath}/%{name}-%{version}-build
53
54%description
55An educational math tutorial game starring Tux, the Linux Penguin.
56
57Based on the classic arcade game "Missile Command," Tux must defend his cities.
58In this case, though, he must do it by solving math problems.
59
60Authors:
61========
62  Bill Kendrick
63  David Bruce
64  Tim Holy
65  Brendan Luchen
66  Jesus Mager
67  Sam 'Criswell' Hart
68  Larry Ewing
69
70
71
72# prep section: ---------------------------------------------------------
73
74%prep
75%setup -q -n %realname-%version
76rm -rf $(find . -type d -name CVS)
77rm -rf $(find . -type d -name .svn)
78rm -rf $(find . -type d -name .xvpics)
79
80
81
82# build section: ---------------------------------------------------------
83
84%build
85%configure --disable-rpath
86make %{?jobs:-j %jobs}
87
88
89
90# install section: ---------------------------------------------------------
91
92%install
93install -d %buildroot/{%_bindir,%_datadir/pixmaps,%_datadir/applications,%_datadir/%progname,%_defaultdocdir/%progname}
94make DESTDIR=%{buildroot} install
95install -m 644 data/images/icons/icon.png %buildroot%_datadir/pixmaps/%progname.png
96
97%if 0%{?suse_version}
98# handle special docdir path
99mv %buildroot/%_datadir/doc/%progname/* %buildroot/%_defaultdocdir/%progname/
100rm -rf %buildroot/%_datadir/doc/%progname
101# install desktop file
102%suse_update_desktop_file -i %progname Education Math
103%fdupes -s %buildroot
104%endif
105%if 0%{?fedora_version}
106# install desktop file
107desktop-file-install --vendor="%{vendor}" \
108  --dir=%buildroot/%_datadir/applications \
109  %progname.desktop
110%endif
111%if 0%{?mandriva_version}
112desktop-file-install --vendor="%{vendor}" \
113  --dir=%buildroot/%_datadir/applications \
114  %progname.desktop
115%endif
116# remove invalid locale directories
117rm -rf %buildroot/%{_datadir}/locale/en@*
118%find_lang %progname
119
120%if 0%{?mandriva_version}
121%post
122%{update_menus}
123
124%postun
125%{clean_menus}
126%endif
127
128%clean
129rm -rf %buildroot
130
131
132
133# files section: ---------------------------------------------------------
134
135%files -f %progname.lang
136
137%defattr(-,root,root)
138%doc %_defaultdocdir/%progname
139%_bindir/*
140%_datadir/pixmaps/*
141%_datadir/applications/*
142%_datadir/%progname
143
144%changelog
145