Blob Blame History Raw
Name:           flobopuyo
Version:        0.20
Release:        5%{?dist}
Summary:        2-player falling bubbles game

Group:          Amusements/Games
License:        GPLv2+
URL:            http://www.ios-software.com/?page=projet&quoi=29
# The upstream source link is a php script that sends the file.  This
# works fine for wget and curl, but confuses rpmbuild when it wants to unpack
# the source tarball.
#Source0:        http://www.ios-software.com/download.php3?what=20151&lg=AN
Source0:        %{name}-%{version}.tgz
Source1:        %{name}.desktop
# Icon converted with icns2png
Source2:        %{name}.png
# Wart
Patch0:         %{name}-0.20-64bit.patch
# Andrea Musuruane
Patch1:         %{name}-0.20-Makefile.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  flex 
BuildRequires:  bison 
BuildRequires:  SDL_mixer-devel 
BuildRequires:  SDL_image-devel 
BuildRequires:  desktop-file-utils
Requires:       hicolor-icon-theme


%description
A two-player falling bubbles game.  The goal is to make groups of four or more
Puyos (colored bubbles) to make them explode and send bad ghost Puyos to your
opponent.  You win the game if your opponent reaches the top of the board. You
can play against computer or another human.


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

# Fix end-of-line-encoding
sed -i 's/\r//' COPYING

# Remove AppleDouble files
rm data/sfx/._bi


%build
export CFLAGS="$RPM_OPT_FLAGS"
make %{?_smp_mflags} PREFIX=%{_prefix}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} PREFIX=%{_prefix}

# Install man page
install -d -m 755 %{buildroot}%{_mandir}/man6
install -m 644 man/%{name}.6 %{buildroot}%{_mandir}/man6

# Install desktop file
desktop-file-install --vendor fedora \
        --dir %{buildroot}%{_datadir}/applications \
        %{SOURCE1}

# Install icon
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/


%clean
rm -rf %{buildroot}

%post
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files
%defattr(-,root,root,-)
%doc COPYING TODO Changelog
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%{_mandir}/man6/%{name}.6*


%changelog
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Mar 24 2008 Andrea Musuruane <musuruan@gmail.com> 0.20-4
- Reverted license to GPLv2+

* Sun Mar 23 2008 Andrea Musuruane <musuruan@gmail.com> 0.20-3
- Fixed License tag
- Improved macro usage

* Sun Feb 10 2008 Andrea Musuruane <musuruan@gmail.com> 0.20-2
- Fixed license
- Added a patch to fix Makefile
- Added hicolor-icon-theme to Requires
- Fixed desktop file
- Fixed desktop file install
- Used converted mac icon
- Updated icon cache scriptlets to be compliant to new guidelines
- Improved macro usage
- Installed man page
- Cosmetic changes

* Wed Aug 16 2006 Wart <wart at kobold dot ort> 0.20-1
- Initial package for Fedora