Blob Blame History Raw
Summary: Frozen Bubble arcade game
Name: frozen-bubble
Version: 2.1.0
Release: 9%{?dist}
License: GPLv2
Group: Amusements/Games
URL: http://www.frozen-bubble.org/
Source0: http://www.frozen-bubble.org/data/frozen-bubble-%{version}.tar.bz2
Source1: frozen-bubble.desktop
Source2: fb-server.init
Patch0: frozen-bubble-2.1.0-bigendianaudio.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl-SDL >= 2.1.3, SDL_mixer-devel, SDL_Pango-devel
BuildRequires: glib2-devel, gettext, desktop-file-utils
Requires: perl-SDL >= 2.1.3
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
Full-featured, colorful animated penguin eyecandy, 100 levels of 1p game, hours
and hours of 2p game, 3 professional quality 20-channels musics, 15 stereo
sound effects, 7 unique graphical transition effects and a level editor.
You need this game.


%package server
Summary: Frozen Bubble network game dedicated server
Group: System Environment/Daemons

%description server
Frozen Bubble network game dedicated server. The server is already included
with the game in order to be launched automatically for LAN games, so you
only need to install this package if you want to run a fully dedicated
Frozen Bubble network game server.


%prep
%setup -q
%patch0 -p0
# Add a directory to the module path for the app's private perl modules
%{__sed} -ie "s#use fb_stuff;#use lib qw(%{_libdir}/%{name}/perl);\n&#" \
    frozen-bubble frozen-bubble-editor
# Rename this README since the main server README has the same name
%{__mv} server/init/README server/README.init
# Change the example server configuration file to be a working one, which only
# launches a LAN server and doesn't try to register itself on the Internet
%{__sed} -ie "s#^a .*#z\nq\nL#" server/init/fb-server.conf


%build
%{__make} %{?_smp_mflags} \
    OPTIMIZE="%{optflags}" \
    CFLAGS="%{optflags} `pkg-config glib-2.0 --cflags`" \
    LIBS="`pkg-config glib-2.0 --libs`" \
    PREFIX=%{_prefix} \
    LIBDIR=%{_libexecdir} \
    DATADIR=%{_datadir} \
    INSTALLDIRS=vendor


%install
%{__rm} -rf %{buildroot}
%{__make} install \
    PREFIX=%{_prefix} \
    LIBDIR=%{_libexecdir} \
    DATADIR=%{_datadir} \
    DESTDIR=%{buildroot}
%find_lang %{name}

# Clean up unneeded files
%{__rm} -f `find %{buildroot} -name perllocal.pod`
%{__chmod} -R u+w %{buildroot}/*
%{__rm} -f %{buildroot}%{perl_vendorarch}/auto/fb_c_stuff/.packlist
%{__rm} -f %{buildroot}%{perl_vendorarch}/auto/fb_c_stuff/fb_c_stuff.bs

# Move some directories around
%{__mkdir_p} %{buildroot}%{_libdir}/%{name}/perl
%{__mv} %{buildroot}%{perl_vendorarch}/auto %{buildroot}%{_libdir}/%{name}/perl/
%{__mv} %{buildroot}%{perl_vendorarch}/*.pm %{buildroot}%{_libdir}/%{name}/perl/

# Desktop file
%{__mkdir_p} %{buildroot}%{_datadir}/applications
desktop-file-install \
    --vendor "" \
    --dir %{buildroot}%{_datadir}/applications \
    %{SOURCE1}

# Icons
%{__install} -D -p -m 0644 icons/frozen-bubble-icon-16x16.png \
    %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{__install} -D -p -m 0644 icons/frozen-bubble-icon-32x32.png \
    %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{__install} -D -p -m 0644 icons/frozen-bubble-icon-48x48.png \
    %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png

# Install server init script and default configuration
%{__install} -D -p -m 0755 %{SOURCE2} \
    %{buildroot}%{_sysconfdir}/rc.d/init.d/fb-server
%{__install} -D -p -m 0644 server/init/fb-server.conf \
    %{buildroot}%{_sysconfdir}/fb-server.conf

# Duplicate the server (it's tiny) to be used in both the game and standalone
# server package
%{__cp} -a %{buildroot}%{_libexecdir}/%{name}/fb-server \
    %{buildroot}%{_bindir}/


%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


%post server
/usr/sbin/useradd -r -s /sbin/nologin -d %{_datadir}/%{name} fbubble \
    &>/dev/null || :
/sbin/chkconfig --add fb-server

%preun server
if [ $1 -eq 0 ]; then
    /sbin/service fb-server stop &>/dev/null || :
    /sbin/chkconfig --del fb-server
fi

%postun server
/usr/sbin/userdel fbubble || :
if [ $1 -ge 1 ]; then
    /sbin/service fb-server condrestart &>/dev/null || :
fi


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README TIPS
%{_bindir}/%{name}*
%{_libdir}/%{name}/
%{_libexecdir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/%{name}/
# The Makefile "install"s these, so they end up executable... fix here
%attr(0644,root,root) %{_mandir}/man6/%{name}*.6.gz

%files server
%defattr(-,root,root,-)
%doc COPYING server/AUTHORS server/README*
%config(noreplace) %{_sysconfdir}/fb-server.conf
%{_sysconfdir}/rc.d/init.d/fb-server
%{_bindir}/fb-server


%changelog
* Sun Jul  6 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 2.1.0-9
- Fix audio on bigendian archs (bz 454109), patch by Ian Chapman

* Mon Mar  3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.1.0-8
- rebuild for new perl (again)

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.1.0-7
- Autorebuild for GCC 4.3

* Thu Feb  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.1.0-6
- rebuild for new perl

* Wed Aug 22 2007 Matthias Saou <http://freshrpms.net/> 2.1.0-5
- Rebuild for new BuildID feature.

* Sun Aug  5 2007 Matthias Saou <http://freshrpms.net/> 2.1.0-4
- Update License field.

* Fri Jun 22 2007 Matthias Saou <http://freshrpms.net/> 2.1.0-3
- Fix build with perl-devel split (ExtUtils/MakeMaker.pm build requirement).
- Cosmetic changes to the spec file.
- Change fbubble user's home from / to %%{_datadir}/%%{name}.
- Remove the desktop file's "fedora" prefix.
- Remove executable bit from the man pages.

* Wed Nov 29 2006 Matthias Saou <http://freshrpms.net/> 2.1.0-2
- Silence useradd call so there is no output upon update (#217902).

* Wed Nov 29 2006 Matthias Saou <http://freshrpms.net/> 2.1.0-1
- Update to 2.1.0 (fixes #216248).

* Fri Oct 27 2006 Matthias Saou <http://freshrpms.net/> 2.0.0-1
- Update to 2.0.0.
- Add new SDL_Pango dependency.
- New server standalone sub-package for the dedicated server.

* Mon Aug 28 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.0-10
- FE6 Rebuild

* Wed Aug 23 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.0-9
- Filter out the autogenerated Provides for our private perl modules and also
  filter out the matching AutoRequires to still get an installable package

* Sun Aug 20 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.0-8
- Apply patch from Wart (wart@kobold.org) to move private perl stuff to
  %%{_libdir}/%%{_name}
- Drop unnescesarry perl BR (already implied by perl-SDL).
- Fix inconsistent use of $RPM_BUILD_ROOT vs ${RPM_BUILD_ROOT} (only use the
  former)

* Tue Aug 15 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.0-7
- Update to work with new perl-SDL-2.1.3 see BZ 202437

* Mon Aug 14 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.0-6
- Submit to Fedora Extras since perl-SDL is in FE now, so frozen-bubble can
  move to FE too
- Cleanup BR's a bit to match FE-guidelines
- Install all sizes icons into /usr/share/icons, instead of just the biggest
  one into /usr/share/pixmaps
- Add scriptlets to update icon cache

* Thu Mar 09 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- switch to new release field

* Tue Feb 28 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- add dist

* Tue Nov 16 2004 Thorsten Leemmhuis <fedora [AT] leemhuis [DOT] info> - 0:1.0.0-0.lvn.5
- Update to new Debian patch

* Sat Jul  3 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.0.0-0.lvn.4
- Apply patch from Debian to make fb work with perl-SDL >= 1.20.3.
- Install Perl modules into vendor install dirs, require (:MODULE_COMPAT_*).
- Fix Source0 URL.
- Remove unneeded files.
- Fix file permissions.
- s/fedora/livna/ in desktop entry, other small improvements.

* Fri Jun 27 2003 Phillip Compton <pcompton at proteinmedia dot com> 0:1.0.0-0.fdr.3
- Removed BuildConflicts.
- Added Epochs to BuildReqs.
- Split Desktop entry into seperate file.

* Sun Jun 22 2003 Phillip Compton <pcompton at proteinmedia dot com> 0:1.0.0-0.fdr.2
- Fixed file permissions.
- Added in suggested fixes from Adrian Reber.

* Tue May 27 2003 Phillip Compton <pcompton at proteinmedia dot com> 0:1.0.0-0.fdr.1
- Fedorafied.

* Tue Apr  1 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Replace the __find_requires with AutoReq: as it works better.
- Remove .xvpics from installed files.

* Mon Mar 31 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Rebuilt for Red Hat Linux 9.

* Tue Feb 18 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Added missing man pages, thanke to Michal Ambroz.

* Mon Feb 17 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Update to 1.0.0.

* Mon Oct 28 2002 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Rebuilt for Red Hat Linux 8.0 (at last!).
- New menu entry.

* Thu Feb  7 2002 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Update to 0.9.3.

* Thu Feb  7 2002 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Spec file modifications for a Red Hat Linux release.

* Wed Feb  6 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 0.9.1-1mdk
- first mdk rpm