Name:		neverball
Version:	1.5.4
Release:	2%{?_dist_release}
Summary:	Roll a ball through an obstacle course
Summary(ja):	障害物のあるコース内でボールを転がすゲーム

Group:		Applications/Games
License:	GPLv2+
URL:		http://neverball.org
Source0:	http://neverball.org/neverball-%{version}.tar.gz
Source1:	neverball.desktop
Source2:	neverputt.desktop
Patch0:		neverball-1.5.4-dso.patch
Patch1:		neverball-1.5.4-libpng16.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	SDL_image-devel, SDL_ttf-devel, SDL_mixer-devel
BuildRequires:	freetype2-devel, desktop-file-utils, zlib-devel
BuildRequires:	libGL-devel, libjpeg-devel, libpng-devel, physfs-devel
BuildRequires:	libvorbis-devel
BuildRequires:	gettext

%description
Tilt the floor to roll a ball through an obstacle course within the
given time.  If the ball falls or time expires, a ball is lost.

Collect 100 coins to save your progress and earn an extra ball.  Red
coins are worth 5.  Blue coins are worth 10.

%description -l ja
障害物のあるコースの床を傾けて、ボールを制限時間内にゴールまで
運ぶゲームです。ボールが落下するか時間切れになると、ボールが1つ
減らされます。

コインを100枚集めるとゲームを保存できてボールも1つ増えます。
赤いコインは1枚で5枚分、青いコインは1枚で10枚分になります。

%prep
%setup -q
%patch0 -p0
%patch1 -p1

%build
%{__make} CFLAGS="$RPM_OPT_FLAGS -ansi `sdl-config --cflags`" DATADIR=%{_datadir}/%{name} %{?_smp_mflags}

%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__install} -p -D -m0755 neverball $RPM_BUILD_ROOT/%{_bindir}/neverball
%{__install} -p -D -m0755 neverputt $RPM_BUILD_ROOT/%{_bindir}/neverputt
%{__install} -p -d -m0755 $RPM_BUILD_ROOT/%{_datadir}/%{name}/
%{__install} -p -D -m0644 data/icon/neverball.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps/neverball.png
%{__install} -p -D -m0644 data/icon/neverputt.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps/neverputt.png
%{__cp} -ap  data/* $RPM_BUILD_ROOT/%{_datadir}/%{name}/

desktop-file-install --vendor vine \
  --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
%{SOURCE1}

desktop-file-install --vendor vine \
  --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
%{SOURCE2}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(0644,root,root,0755)
%doc CHANGES COPYING README
%attr(0755,root,root) %{_bindir}/*
%{_datadir}/%{name}/
%{_datadir}/pixmaps/*
%{_datadir}/applications/*

%changelog
* Mon Sep 15 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.5.4-2
- rebuild with VineSeed environment
- add Patch1 (neverball-1.5.4-libpng16.patch)

* Sat Dec 25 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 1.5.4-1
- initial build for Vine Linux based on fedora development

* Mon Apr 19 2010 Wart <wart@kobold.org> - 1.5.4-3 
- Add explicit link against -lX11 -lm to remove implicit library
  linkage (#565203)

* Sun Jan 10 2010 Wart <wart@kobold.org> - 1.5.4-2 
- Set DATADIR so that neverball and neverputt can find their data (#538210)

* Thu Oct 8 2009 Wart <wart@kobold.org> - 1.5.4-1
- Update to 1.5.4

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Jan 29 2009 Wart <wart@kobold.org> - 1.4.0-15
- Change from bitstream-vera font to equivalent dejavu font.

* Fri Jan 16 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.4.0-14
- Fix font Requires bitstream-vera-fonts-sans ->
  bitstream-vera-sans-fonts (another font naming convention change).

* Thu Jan 1 2009 Wart <wart@kobold.org> - 1.4.0-13
- Fix font package name for F11

* Tue Dec 23 2008 Wart <wart@kobold.org> - 1.4.0-12
- Replace bundled font with a symlink to an identical system font (BZ #477432)

* Fri Feb 8 2008 Wart <wart@kobold.org> - 1.4.0-11
- Rebuild for gcc 4.3

* Sat Sep 29 2007 Wart <wart@kobold.org> - 1.4.0-10
- Add wrapper for detecting DRI when launching game (BZ #304811)

* Mon Aug 20 2007 Wart <wart@kobold.org> - 1.4.0-9
- License tag clarification

* Fri Mar 9 2007 Wart <wart@kobold.org> - 1.4.0-8
- Updated desktop file categories

* Sat Sep 2 2006 Wart <wart@kobold.org> - 1.4.0-7
- Change BR: for opengl
- Rebuild for Fedora Extras

* Thu Mar 2 2006 Wart <wart@kobold.org> - 1.4.0-6
- Add dist tag now that spec files are different between releases

* Mon Feb 27 2006 Wart <wart@kobold.org> - 1.4.0-5
- Added BR: mesa-libGL-devel for modular xorg
- Added smp_mflags to compile line to speed up build on smp machines

* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 1.4.0-4
- rebuild on all arches

* Thu Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* Thu Nov 11 2004 Matthias Saou <http://freshrpms.net/> 1.4.0-2
- Bump release to provide Extras upgrade path.
- Fix tabs/spaces mixture.
- Make the changelog breathe a little, and be readable.

* Sat Oct 16 2004 Nils O. Selåsdal <NOS@Utel.no>- 0:1.4.0-0.fdr.1
- Update to 1.4.0
- Remove libGLU BuildRequires, it seems to be gone with an xorg errata,
  xorg-x11-devel should be all thats needed now though.
- Add neverputt .desktop file

* Fri Aug 13 2004 Nils O. Selåsdal <NOS@Utel.no>- 0:1.3.7-0.fdr.1
- Update to 1.3.7, which fixes a corruption in Neverputt level 16

* Tue Aug 03 2004 Nils O. Selåsdal <NOS@Utel.no>- 0:1.3.6-0.fdr.1
- Update to 1.3.6

* Thu Jul 08 2004 Nils O. Selåsdal <NOS@Utel.no>- 0:1.3.1-0.fdr.1
- Update to 1.3.1
- Add icon to .desktop file
- Really include neverputt binary

* Thu Jun 03 2004 Nils O. Selåsdal <NOS@Utel.no>- 0:1.2.5-0.fdr.2
- Sign the src.rpm

* Tue Jun 01 2004 Nils O. Selåsdal <NOS@Utel.no>- 0:1.2.5-0.fdr.1
- 1.2.5 and updated to work on FC2
- Include new neverputt binary.
- Use CFLAGS for pullingin RPM_OPT_FLAGS

* Fri Mar 19 2004 Nils O. Selåsdal <NOS@Utel.no>- 0:1.1.0-0.fdr.1
- 1.1.0

* Fri Nov 21 2003 Nils O. Selåsdal <NOS@Utel.no>- 0:1.0.0-0.fdr.2
- Add missing BuildRequires.

* Sat May 03 2003 Nils O. Selåsdal <NOS@Utel.no> - 0:1.0.0-0.fdr.1
- Initial RPM release.

