%define name	frozen-bubble
%define version	2.1.0
%define release	1%{?_dist_release}

Summary:	Game that arranges and erases the same color bubble
Summary(ja): 	同じ色の泡を揃えて消していくゲーム
Name:		%{name}
Version:	%{version}
Release: 	%{release}
Source0:	http://www.frozen-bubble.org/data/%{name}-%{version}.tar.bz2
Source1:	frozen-bubble.desktop
License:	GPL
Group:		Applications/Games
URL:		http://www.frozen-bubble.org/home/

Requires:	perl
BuildRequires:	SDL-devel, SDL_mixer-devel
BuildRequires:	SDL_perl, SDL_Pango-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-root


%description
Frozen-bubble is a puzzle-bobble like puzzle game.

Colorful 3D rendered penguin animations, 100 levels of 1p game,
hours and hours of 2p game, nights and nights of 2p/3p/4p/5p
game over LAN or Internet, a level-editor, 3 professional quality
digital soundtracks, 15 stereo sound effects, 8 unique graphical
transition effects, 8 unique logo eye-candies.

%description -l ja
Frozen-bubble はパズルボブルに似たパズルゲームです。

カラフルな 3D ペンギンのアニメーションや、1人プレイ用の100レベル
のステージ、2人プレイによる対戦、2人から5人までの LAN やインター
ネット経由のネットワーク対戦、レベルエディタ、3曲の高品質なサウン
ドトラック、15種類のステレオサウンドエフェクト、8種類のユニークな
画面エフェクト、8つのロゴアニメーションが楽しめます。


%prep
%setup -q


%build
%{__make} OPTIMIZE="$RPM_OPT_FLAGS" \
          CFLAGS="$RPM_OPT_FLAGS `pkg-config glib-2.0 --cflags`" \
          LIBS="`pkg-config glib-2.0 --libs`" \
          LIBDIR=%{_libdir} \
          DATADIR=%{_datadir} \
          INSTALLDIRS=vendor


%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__make} install DESTDIR=$RPM_BUILD_ROOT \
                  LIBDIR=%{_libdir} \
                  DATADIR=%{_datadir} \
                  BINDIR=%{_bindir} \
                  MANDIR=%{_mandir} \
                  LOCALEDIR=%{_datadir}/locale

# install icon & desktop files
%{__install} -m 644 -D icons/frozen-bubble-icon-48x48.png ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/%{name}.png
%{__install} -m 644 -D %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop

# Remove unnecessary files.
%{__rm} -rf ${RPM_BUILD_ROOT}/%{perl_vendorarch}/auto/fb_c_stuff/.packlist
%{__rm} -rf ${RPM_BUILD_ROOT}/%{perl_archlib}/perllocal.pod
                  
%find_lang %{name}


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING INSTALL NEWS README TIPS
%{_bindir}/frozen-bubble
%{_bindir}/frozen-bubble-editor
%{_libdir}/frozen-bubble/fb-server
%{perl_vendorarch}/FBLE.pm
%{perl_vendorarch}/auto/fb_c_stuff/fb_c_stuff*
%{perl_vendorarch}/fb_c_stuff.pm
%{perl_vendorarch}/fb_net.pm
%{perl_vendorarch}/fb_stuff.pm
%{perl_vendorarch}/fbsyms.pm
%{_datadir}/frozen-bubble/*
%{_datadir}/pixmaps/frozen-bubble.png
%{_datadir}/applications/frozen-bubble.desktop
%{_mandir}/man6/frozen-bubble*

%changelog
* Sun Sep 07 2008 Shu KONNO <owa@bg.wakwak.com> 2.1.0-1vl5
- applied new versioning policy, spec in utf-8

* Mon Mar 26 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.1.0-0vl1
- initial build for Vine Linux
