File csmash.spec of Package csmash

#
# spec file for package csmash (Version 0.6.6)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           csmash
BuildRequires:  SDL_image-devel SDL_mixer-devel fdupes gcc-c++ gtk1-compat-devel libdrm-devel update-desktop-files xorg-x11-devel
License:        GPL v2 or later
Group:          Amusements/Games/3D/Other
AutoReqProv:    on
Version:        0.6.6
Release:        136
Source:         %{name}-%{version}.tar.bz2
Source1:        danslatristesse2-48.ogg
Source2:        %name.desktop
Patch:          %{name}-%{version}.diff
Patch2:         %{name}-%{version}-datadir.diff
Patch3:         %{name}-%{version}-return_value.diff
Patch4:         %{name}-%{version}-qualification.diff
Patch5:         %{name}-%{version}-definitions.diff
Patch6:         %{name}-%{version}-uninitialized.diff
Url:            http://cannonsmash.sourceforge.net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        3D Table Tennis Game

%description
CannonSmash is a 3D table tennis game. The goal of this project is to
represent various table tennis strategies in a computer game.



Authors:
--------
    nan@utmc.or.jp

%prep
%setup
%patch
%patch2 -p1
%patch3
%patch4
%patch5
%patch6
mv README README.jp
cp README.en README
%{?suse_update_config:%{suse_update_config -f}}

%build
gettextize -f
aclocal -I m4
autoreconf --force --install
automake
export CXXFLAGS="$RPM_OPT_FLAGS" 
%if "%(xft-config --prefix)" == "/usr"
./configure --prefix=%{_prefix} --datadir=%{_datadir} --bindir=%{_bindir} \
--x-includes=/usr/include --x-libraries=/usr/%_lib
%else
./configure --prefix=%{_prefix} --datadir=%{_datadir} --bindir=%{_bindir}
%endif
# it is needed to call CXXFLAGS together with make
# it is not sufficient to export them only
make %{?jobs:-j%jobs} CXXFLAGS="-I/usr/include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT $RPM_OPT_FLAGS"

%install
make DESTDIR=$RPM_BUILD_ROOT install
cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/csmash
%suse_update_desktop_file -i %name Game SportsGame
%fdupes -s  $RPM_BUILD_ROOT
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root,755)
%{_bindir}/csmash
#%{_datadir}/locale/*/LC_MESSAGES/csmash.mo
%{_datadir}/csmash
%doc README README.jp AUTHORS COPYING CREDITS ChangeLog
/usr/share/applications/%name.desktop
%changelog
* Mon Nov 12 2007 - lmichnovic@suse.cz
- using find_lang macro
- fixed uninitilized variable (uninitialized.diff)
* Fri Nov 09 2007 - lmichnovic@suse.cz
- using fdupes macro
- not installing files INSTALL, NEWS (zero lenght)
- renamed last patch to *definitions.diff
* Thu Oct 25 2007 - pgajdos@suse.cz
- fixed build with new gcc 4.3
* Fri Mar 23 2007 - lmichnovic@suse.cz
- forcing use of CXXFLAGS for compilation
* Mon Aug 07 2006 - lmichnovic@suse.cz
- using gettextize -f to fix not expanding macro MKINSTALLDIRS
* Fri Jul 28 2006 - lmichnovic@suse.cz
- checking version of X.org instead of suse_version
* Mon Jul 24 2006 - lmichnovic@suse.cz
- fixed new X.org 7.x includes and headers dir
- now using aclocal, automake, autoconf
- using make %%{?jobs:-j%%jobs} for icecream
* Fri Jan 27 2006 - nadvornik@suse.cz
- fixed BuildRequires
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Oct 20 2005 - lmichnovic@suse.cz
- fixed invalid extra qualification for build with new gcc 4.1
* Mon Oct 10 2005 - lmichnovic@suse.cz
- upgrade to version 0.6.6
- now building as gtk2 application
* Sat Jan 10 2004 - adrian@suse.de
- add %%defattr
* Tue Aug 12 2003 - ltinkl@suse.cz
- fixed bug #28657 (wrong datadir)
* Mon Aug 11 2003 - sndirsch@suse.de
- added desktop file
* Fri Jul 11 2003 - ltinkl@suse.cz
- updated to version 0.6.5
- install binary to /usr/bin and data to /usr/share
* Tue Jun 03 2003 - ro@suse.de
- added translations to filelist
* Tue Sep 03 2002 - ro@suse.de
- fix compilation (object->name may not be passed though ...)
* Wed Jul 31 2002 - uli@suse.de
- fixed to build on 64 bit archs
* Tue Jul 30 2002 - tcrhak@suse.cz
- update to version 0.6.4.2
* Tue Nov 13 2001 - tcrhak@suse.cz
- removed aclocal, autoconf and automake
* Thu Nov 08 2001 - ro@suse.de
- use mesa-devel-packages in neededforbuild
* Thu Oct 18 2001 - tiwai@suse.de
- updated to version 0.6.3.
- added smpeg and smpeg-devel to neededforbuild.
* Wed Oct 17 2001 - schwab@suse.de
- Fix for gcc 3.
* Mon Sep 03 2001 - tiwai@suse.de
- updated to version 0.6.2
  (better graphics, bug fixes, opening BGM).
* Wed Aug 08 2001 - ro@suse.de
- changed neededforbuild <kdelibs kdelibs-devel> to <kdelibs-artsd>
* Wed Aug 08 2001 - ro@suse.de
- changed neededforbuild <sdl> to <SDL>
- changed neededforbuild <sdl-devel> to <SDL-devel>
* Mon Jul 30 2001 - dan@suse.cz
- 0.6.1 version
* Wed Jun 20 2001 - ro@suse.de
- added kdelibs for arts
* Sun May 06 2001 - sndirsch@suse.de
- replaced glx with mesasoft in #neededforbuild
* Sat Apr 14 2001 - schwab@suse.de
- Add alsa to neededforbuild.
* Fri Apr 13 2001 - pblaha@suse.cz
- update on 0.6.0
* Thu Mar 15 2001 - ro@suse.de
- changed neededforbuild <mesaglu> to <xf86glu>
- changed neededforbuild <mesaglu-devel> to <xf86glu-devel>
* Thu Mar 08 2001 - uli@suse.de
- added mesaglu*, mesaglut* to neededforbuild
* Wed Mar 07 2001 - ro@suse.de
- changed neededforbuild <mesadev> to <mesa-devel>
* Wed Dec 20 2000 - pblaha@suse.cz
- create this package