+#
+# TODO: try to pass our CFLAGS and LDFLAGS
+#
Summary: hatari - an Atari ST and STE emulator for Linux
Summary(pl.UTF-8): hatari - emulator Atari ST i STE dla Linuksa
Name: hatari
-Version: 1.3.1
+Version: 1.4.0
Release: 1
License: GPL v2+
Group: Applications/Emulators
Source0: http://download.berlios.de/hatari/%{name}-%{version}.tar.bz2
-# Source0-md5: 112b544ec4affb7c04e931088e62a115
+# Source0-md5: 2f30e5c9e146ee92e3f2f5ae1cef3673
Patch0: %{name}-useless_files.patch
Patch1: %{name}-python_init.patch
Patch2: %{name}-desktop.patch
URL: http://hatari.sourceforge.net/
BuildRequires: SDL-devel >= 1.2.0
-BuildRequires: autoconf
-BuildRequires: automake
+BuildRequires: cmake
BuildRequires: libpng-devel
BuildRequires: pkgconfig
BuildRequires: readline-devel
%description -l pl.UTF-8
Hatari jest emulatorem Atari ST i STE dla Linuksa i innych systemów
-obsługiwanych przez bibliotekę SDL. Hatari emuluje większość
-sprzętu Atari ST i STE.
+obsługiwanych przez bibliotekę SDL. Hatari emuluje większość sprzętu
+Atari ST i STE.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%{__sed} -i 's#path=$(DATAPATH)#path=%{_datadir}/hatari/hatariui#' python-ui/Makefile
%build
-%{__aclocal}
-%{__autoconf}
-%configure \
- --datadir=%{_datadir}/%{name}
+install -d build
+cd build
+%cmake .. \
+ -DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+%if "%{_lib}" == "lib64"
+ -DLIB_SUFFIX=64
+%endif
+
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_mandir}/{,fr}/man1}
-%{__make} install \
+%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-install doc/hatari.1 $RPM_BUILD_ROOT%{_mandir}/man1/hatari.1
install doc/fr/hatari.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1
%clean
%files
%defattr(644,root,root,755)
-%doc readme.txt doc/*.txt python-ui/{Changelog,README,TODO}
+%doc readme.txt doc/*.txt python-ui/{README,TODO}
%attr(755,root,root) %{_bindir}/*
%{_datadir}/%{name}
-%{_mandir}/man1/hatari.1*
+%{_mandir}/man1/hatari*.1*
%lang(fr) %{_mandir}/fr/man1/hatari.1*
%{_desktopdir}/hatariui.desktop
%{_iconsdir}/hicolor/32x32/apps/hatari-icon.png