File jag.spec of Package jag

Name:           jag
Version:        0.3.1
Release:        4.1
Url:            http://jag.xlabsoft.com/
License:        GPLv2
Group:          Amusements/Games/Action/Arcade
Summary:        An arcade-puzzle 2D game
Source0:        %{name}-%{version}-src.tar.bz2
Source1:        %{name}_african.tar.bz2
Source2:        %{name}_animals.tar.bz2
Source3:        %{name}_chinese.tar.bz2
Source4:        %{name}_creatures.tar.bz2
Source5:        %{name}_futurama.tar.bz2
Source6:        %{name}_kde.tar.bz2
Source7:        %{name}_toys.tar.bz2
Source98:       %{name}.desktop
Source99:       %{name}-editor.desktop
Patch0:         %{name}-0.2.3-paths.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc-c++
BuildRequires:  libqt4-devel
BuildRequires:  SDL-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  unzip
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%description
JAG is an arcade-puzzle 2D game.

%prep
%setup -q -n %{name}-%{version}-src
%patch0
cd data/schemes
tar xfj %{SOURCE1}
tar xfj %{SOURCE2}
tar xfj %{SOURCE3}
tar xfj %{SOURCE4}
tar xfj %{SOURCE5}
tar xfj %{SOURCE6}
tar xfj %{SOURCE7}

%build
qmake
make %{?_smp_mflags}
cd editor
qmake
make %{?_smp_mflags}

%install
make INSTALL_ROOT=%{buildroot} install
install -D -m 0644 ./data/schemes/default/item1.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -D -m 0644 %{SOURCE98} %{buildroot}%{_datadir}/applications/%{name}.desktop
cd editor
make INSTALL_ROOT=%{buildroot} install
install -D -m 0644 %{SOURCE99} %{buildroot}%{_datadir}/applications/%{name}-editor.desktop
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_bindir}/%{name}-editor
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/%{name}-editor.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
* Fri Mar 12 2010 adam@mizerski.pl
- updated to version 0.3.1
  * added German translation (thanks to Kristjan Schmidt)
  * Fixes:
  * * broken font in dialogs with low screen resolution
  * * alternative detection of video modes on X11 if xrandr fails
  * * some compiler warnings removed
  * * some memory leaks removed
  * Improvements:
  * * main menu is centered to be visible even if JAG's main window cannot fit on the screen
* Fri Jan  1 2010 randybb@gmail.com
- updated to version 0.3.0
* Fri Nov  6 2009 randybb@gmail.com
- updated to version 0.2.6 (includes SunZero levels)
* Fri Aug 14 2009 prusnak@suse.cz
- updated to version 0.2.5
* Thu Jul 16 2009 randybb@gmail.com
- added desktop file and icon
* Wed Jul 15 2009 randybb@gmail.com
- updated to version 0.2.3
* Tue Jun 30 2009 prusnak@suse.cz
- created package (version 0.2.0)
openSUSE Build Service is sponsored by