Blob Blame History Raw
Summary: An Atari ST emulator suitable for playing games
Name: hatari
Version: 1.3.1
Release: 1%{?dist}
License: GPLv2+
Group: Applications/Emulators
URL: http://hatari.berlios.de/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: http://download.berlios.de/%{name}/%{name}-%{version}.tar.bz2
Source1: hatari.desktop
Source2: hatari-README.tos
BuildRequires: SDL-devel >= 1.2.0
BuildRequires: zlib-devel
BuildRequires: libicns-utils
BuildRequires: desktop-file-utils
Requires: hicolor-icon-theme


%description
Hatari is an emulator for the Atari ST, STE, TT and Falcon computers.
More precisely, it is an adaption of the WinSTon source code to 
Linux, using the UAE CPU core instead of the original, non-portable 
assembler CPU core.

The Atari ST was a 16/32 bit computer system which was first released 
by Atari in 1985. Using the Motorola 68000 CPU, it was a very popular 
computer having quite a lot of CPU power at that time.

Unlike many other Atari ST emulators which try to give you a good 
environment for running GEM applications, Hatari tries to emulate the 
hardware of a ST as close as possible so that it is able to run most 
of the old ST games and demos.


%prep
%setup -q

cp -p %{SOURCE2} README.tos

# Fix Makefile not to strip binaries during make install
sed -i 's/@INSTALL_PROGRAM@ -s/@INSTALL_PROGRAM@/' Makefile.cnf.in

# Do not install python UI
sed -i 's|$(MAKE) -C python-ui/ install||' Makefile


%build
%configure --datadir=%{_datadir}/hatari
# It does not compile with smp_mflags
make 


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

# Install French man page
install -d -m 755 %{buildroot}%{_mandir}/fr/man1
install -p -m 644 doc/fr/hatari.1 %{buildroot}%{_mandir}/fr/man1

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

# Extract Mac OS X icons
icns2png -x src/gui-osx/Hatari.icns 

# Install icons
for i in 16 32 48 128; do
  install -d -m 755 %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
  install -m 644 Hatari_${i}x${i}x32.png \
    %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/hatari.png
done

# Remove installed doc files
rm -rf  %{buildroot}%{_docdir}/%{name}


%clean
rm -rf %{buildroot}


%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :


%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi


%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files
%defattr(-,root,root)
%{_bindir}/hatari
%{_bindir}/zip2st
%{_bindir}/hmsa
%{_datadir}/hatari
%{_mandir}/man1/hatari.1*
%{_mandir}/fr/man1/hatari.1*
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%doc gpl.txt readme.txt doc/{*.txt,*.html,images}
%doc tools/hmsa/readme-hmsa.txt
%doc README.tos


%changelog
* Sat Sep 12 2009 Andrea Musuruane <musuruan@gmail.com> 1.3.1-1
- updated to upstream 1.3.1

* Sat Aug 22 2009 Andrea Musuruane <musuruan@gmail.com> 1.3.0-1
- updated to upstream 1.3.0
- disabled new upstream python UI
- updated icon cache snippets
- used upstream Mac OS X icons
- preserved french man page timestamp

* Mon Aug 10 2009 Andrea Musuruane <musuruan@gmail.com> 1.2.0-4
- updated Source0 URL

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

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

* Sat Jan 24 2009 Andrea Musuruane <musuruan@gmail.com> 1.2.0-1
- updated to upstream 1.2.0
- dropped no longer needed hmsa tool patch
- updated upstream URL
- updated Source0 URL

* Sat Nov 29 2008 Andrea Musuruane <musuruan@gmail.com> 1.1.0-1
- updated to upstream 1.1.0

* Sat Apr 05 2008 Andrea Musuruane <musuruan@gmail.com> 1.0.1-1
- updated to upstream 1.0.1

* Mon Mar 17 2008 Andrea Musuruane <musuruan@gmail.com> 1.0.0-1
- updated to upstream 1.0.0
- removed icon extension from desktop file to match Icon Theme Specification

* Sun Feb 10 2008 Andrea Musuruane <musuruan@gmail.com> 0.95-5
- Rebuilt against gcc 4.3

* Sat Oct 06 2007 Andrea Musuruane <musuruan@gmail.com> 0.95-4
- Fixed doc/authors.txt file encoding
- Updated icon cache scriptlets to be compliant to new guidelines

* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 0.95-3
- Rebuild for selinux ppc32 issue.

* Mon Aug 20 2007 Andrea Musuruane <musuruan@gmail.com> 0.95-2
- changed license due to new guidelines 
- removed %%{?dist} tag from changelog

* Sat Jun 23 2007 Andrea Musuruane <musuruan@gmail.com> 0.95-1
- updated to upstream 0.95
- updated description
- README.tos and hatari.desktop are no longer built in the spec file
- added new upstream hmsa tool
- added new upstream french man page
- updated icon cache scriptlets to be compliant to new guidelines
- cosmetic changes

* Sat Mar 17 2007 Andrea Musuruane <musuruan@gmail.com> 0.90-6
- dropped --add-category X-Fedora from desktop-file-install
- changed .desktop category to Game;Emulator;
- now using sed to fix makefile not to strip binaries during make install
- cosmetic changes to BR section

* Mon Oct 23 2006 Andrea Musuruane <musuruan@gmail.com> 0.90-5
- added a patch not to strip binaries during make install
- added hicolor-icon-theme to Requires

* Sat Oct 21 2006 Andrea Musuruane <musuruan@gmail.com> 0.90-4
- added README.tos to explain that Hatari is shipped with EmuTOS

* Fri Oct 20 2006 Andrea Musuruane <musuruan@gmail.com> 0.90-3
- new release for FE migration

* Sun Oct 08 2006 Andrea Musuruane <musuruan@gmail.com> 0.90-2
- replaced %%_mandir with %%{_mandir}
- full URL is now specified in the Source tag
- added .desktop file and icons

* Sat Sep 30 2006 Andrea Musuruane <musuruan@gmail.com> 0.90-1
- initial package