Blob Blame History Raw
Summary: Arcade 2D shoot-them-up game
Name: powermanga
Version: 0.79
Release: 7%{?dist}
License: GPL
Group: Amusements/Games
URL: http://linux.tlk.fr/games/Powermanga/
Source0: http://linux.tlk.fr/games/Powermanga/download/powermanga-%{version}.tgz
Source1: powermanga.png
Patch0: powermanga-64bit.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: SDL-devel, SDL_mixer-devel, desktop-file-utils
# Use monolithic X up to FC4, and modular X for FC5+
%if 0%{?fedora} < 5
%else
BuildRequires: libXxf86dga-devel, libXxf86vm-devel
%endif

%description
Powermanga is an arcade 2D shoot-them-up game with 41 levels and more than
200 sprites.


%prep
%setup -q
%patch0 -p1 -b .64bit

%{__cat} > %{name}.desktop << EOF
[Desktop Entry]
Name=Powermanga
Comment=Arcade 2D shoot-them-up game
Icon=powermanga.png
Exec=powermanga
Terminal=false
Type=Application
Categories=Application;Game;ArcadeGame;
Encoding=UTF-8
EOF

%{__cat} > %{name}.sh << 'EOF'
#!/bin/bash
exec %{_prefix}/games/powermanga "$@"
EOF


%build
%configure
%{__make} %{?_smp_mflags} CXXFLAGS="%{optflags}"


%install
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR=%{buildroot}

# Install wrapper script
%{__install} -D -m 0755 %{name}.sh %{buildroot}%{_bindir}/powermanga

# Allow stripping, g+s will be set in %%files
%{__chmod} g-s %{buildroot}%{_prefix}/games/powermanga

# Fix location of the man page
%{__mkdir_p} %{buildroot}%{_mandir}/man6/
%{__mv} %{buildroot}%{_prefix}/share/man/powermanga.6 \
        %{buildroot}%{_mandir}/man6/

# Install pixmap for the menu entry
%{__install} -D -m 0644 %{SOURCE1} \
    %{buildroot}%{_datadir}/pixmaps/powermanga.png

# Install menu entry
%{__mkdir_p} %{buildroot}%{_datadir}/applications
desktop-file-install \
    --vendor fedora \
    --dir %{buildroot}%{_datadir}/applications \
    %{name}.desktop


%clean
%{__rm} -rf %{buildroot}


%files
%defattr(-, root, root, 0755)
%doc AUTHORS CHANGES COPYING README
%{_bindir}/powermanga
%attr(2755, root, games) %{_prefix}/games/powermanga
%{_datadir}/games/powermanga/
%{_datadir}/pixmaps/powermanga.png
%{_mandir}/man6/powermanga.6*
%config(noreplace) %attr(664, root, games) %{_var}/games/powermanga.hi
%config(noreplace) %attr(664, root, games) %{_var}/games/powermanga.hi-easy
%config(noreplace) %attr(664, root, games) %{_var}/games/powermanga.hi-hard
%{_datadir}/applications/*-%{name}.desktop


%changelog
* Thu Feb  9 2006 Matthias Saou <http://freshrpms.net/> 0.79-7
- Rebuild for new gcc/glibc and modular X.

* Mon Nov  7 2005 Matthias Saou <http://freshrpms.net/> 0.79-6
- Fix stripping (when g+s is set, it doesn't happen) and add wrapper script in
  $PATH (#165313, Ville Skyttä).
- Let SDL-devel pull in X devel files.
- Remove old freedesktop build conditional.

* Wed May 25 2005 Jeremy Katz <katzj@redhat.com> - 0.79-5
- add patch from Ignacio to fix build on x86_64 (#158464)

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

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

* Tue Nov 16 2004 Matthias Saou <http://freshrpms.net/> 0.79-2
- Bump release to provide Extras upgrade path.

* Tue Aug 10 2004 Matthias Saou <http://freshrpms.net/> 0.79-1
- Spec file cleanup.
- Included the menu pixmap from the Mandrake package.
- Update to 0.79.

* Wed Dec 20 2000 Matthias Saou <http://freshrpms.net/> 0.71c-2
- Initial RPM release.