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