+#
# Conditional build:
-# _without_svga - don't build svgalib version
-# _without_x11 - don't build X11 version
-# _without_fb - don't build framebuffer version
-# _without_sdl - don't build SDL version
-
+%bcond_without svga # do not build svgalib version
+%bcond_without x # do not build X11 version
+%bcond_without fb # do not build framebuffer version
+%bcond_without sdl # do not build SDL version
+#
+%ifnarch %{ix86} alpha ppc
+%undefine with_svga
+%endif
Summary: Free Unix Spectrum Emulator
Summary(pl): Darmowy uniksowy emulator ZX Spectrum
Name: fuse
-Version: 0.6.0
+Version: 0.6.2
Release: 1
License: GPL
Group: Applications/Emulators
-Source0: http://www.srcf.ucam.org/~pak21/spectrum/%{name}-%{version}.tar.gz
-# Source0-md5: 6e8b1f31296b498332ab871dbdc378c6
-URL: http://www.srcf.ucam.org/~pak21/spectrum/fuse.html
-%{!?_without_sdl:BuildRequires: SDL-devel}
+Source0: http://dl.sourceforge.net/fuse-emulator/%{name}-%{version}.tar.gz
+# Source0-md5: 4195399aaa3a471ea64606f5eb10c6f8
+URL: http://fuse-emulator.sourceforge.net/
+%{?with_sdl:BuildRequires: SDL-devel}
BuildRequires: autoconf
BuildRequires: automake
-%{!?_without_x11:BuildRequires: gtk+-devel}
+%{?with_x:BuildRequires: gtk+-devel}
BuildRequires: lib765-devel
+BuildRequires: libjsw-devel
BuildRequires: libpng-devel
-BuildRequires: libspectrum-devel >= 0.1.1
+BuildRequires: libspectrum-devel >= 0.2.1
BuildRequires: libxml2-devel
BuildRequires: perl
-%ifarch %{ix86} alpha ppc
-%{!?_without_svga:BuildRequires: svgalib-devel}
-%endif
+%{?with_svga:BuildRequires: svgalib-devel}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
* Support for loading from .tzx files.
* Sound.
-This package contains common files for X11 and svga version.
+This package contains common files for all versions.
%description common -l pl
fuse (Free Unix Spectrum Emulator) jest emulatorem ZX Spectrum.
* D¼wiêk.
* Emulacja kilku drukarek przeznaczonych dla ZX Spectrum.
-W tym pakiecie znajduj± siê wspólne pliki dla wersji X11 i svga.
+W tym pakiecie znajduj± siê wspólne pliki dla wszystkich wersji.
-%if %{!?_without_fb:1}0
%package fb
Summary: Free Unix Spectrum Emulator (framebuffer version)
Summary(pl): Darmowy uniksowy emulator ZX Spectrum (wersja na framebuffer)
Group: Applications/Emulators
-Requires: %{name}-common = %{version}
+Requires: %{name}-common = %{version}-%{release}
%description fb
fuse is Free Unix Spectrum Emulator.
* Mo¿liwo¶æ ³adowania programów z plików .tzx.
* D¼wiêk.
-W tym pakiecie znajduj± siê pliki dla wersji korzystaj±cej z framebuffera.
-%endif
+W tym pakiecie znajduj± siê pliki dla wersji korzystaj±cej z
+framebuffera.
-%if %{!?_without_sdl:1}0
%package sdl
Summary: Free Unix Spectrum Emulator (SDL version)
Summary(pl): Darmowy uniksowy emulator ZX Spectrum (wersja na SDL)
Group: Applications/Emulators
-Requires: %{name}-common = %{version}
+Requires: %{name}-common = %{version}-%{release}
%description sdl
fuse is Free Unix Spectrum Emulator.
* Mo¿liwo¶æ ³adowania programów z plików .tzx.
* D¼wiêk.
-W tym pakiecie znajduj± siê pliki dla wersji korzystaj±cej z SDL.
+W tym pakiecie znajduj± siê pliki dla wersji korzystaj±cej z SDL.
-%endif
-
-%if %{!?_without_svga:1}0
%package svga
Summary: Free Unix Spectrum Emulator (svga version)
Summary(pl): Darmowy uniksowy emulator ZX Spectrum (wersja na svgalib)
Group: Applications/Emulators
-Requires: %{name}-common = %{version}
+Requires: %{name}-common = %{version}-%{release}
%description svga
fuse is Free Unix Spectrum Emulator.
* Mo¿liwo¶æ ³adowania programów z plików .tzx.
* D¼wiêk.
-W tym pakiecie znajduj± siê pliki dla wersji korzystaj±cej z svgalib.
-
-%endif
+W tym pakiecie znajduj± siê pliki dla wersji korzystaj±cej z svgalib.
-%if %{!?_without_x11:1}0
%package X11
Summary: Free Unix Spectrum Emulator (X11 version)
Summary(pl): Darmowy uniksowy emulator ZX Spectrum (wersja na XWindow)
Group: Applications/Emulators
-Requires: %{name}-common = %{version}
+Requires: %{name}-common = %{version}-%{release}
%description X11
fuse is Free Unix Spectrum Emulator.
W tym pakiecie znajduj± siê pliki dla wersji X11.
-%endif
-
%prep
%setup -q
+touch ui/sdl/sdljoystick.h
%build
-rm -f missing
%{__aclocal}
%{__autoheader}
%{__autoconf}
%{__automake}
# X11
-%if %{!?_without_x11:1}0
+%if %{with x}
%configure \
+ --disable-ui-joystick \
+ --with-joystick \
--with-gtk
%{__make} clean
%{__make}
%endif
# SDL
-%if %{!?_without_sdl:1}0
+%if %{with sdl}
%configure \
+ --disable-ui-joystick \
+ --with-joystick \
--with-sdl
%{__make} clean
%{__make}
%endif
# svga
-%ifarch %{ix86} alpha ppc
-%if %{!?_without_svga:1}0
+%if %{with svga}
%configure \
+ --disable-ui-joystick \
+ --with-joystick \
--with-svgalib
%{__make} clean
%{__make}
cp -f ./fuse ./fuse-svga
%endif
-%endif
# framebuffer
-%if %{!?_without_fb:1}0
+%if %{with fb}
%configure \
+ --with-joystick \
--with-fb
%{__make} clean
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
+
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-%ifarch %{ix86} alpha ppc
-%{!?_without_svga:install fuse-svga $RPM_BUILD_ROOT%{_bindir}}
-%endif
-%{!?_without_x11:install fuse-x11 $RPM_BUILD_ROOT%{_bindir}}
-%{!?_without_fb:install fuse-fb $RPM_BUILD_ROOT%{_bindir}}
-%{!?_without_sdl:install fuse-sdl $RPM_BUILD_ROOT%{_bindir}}
+%{?with_svga:install fuse-svga $RPM_BUILD_ROOT%{_bindir}}
+%{?with_x:install fuse-x11 $RPM_BUILD_ROOT%{_bindir}}
+%{?with_fb:install fuse-fb $RPM_BUILD_ROOT%{_bindir}}
+%{?with_sdl:install fuse-sdl $RPM_BUILD_ROOT%{_bindir}}
%clean
rm -rf $RPM_BUILD_ROOT
%files common
%defattr(644,root,root,755)
-%doc README THANKS AUTHORS keysyms.dat keysyms.pl hacking/*
-%dir %{_datadir}/%{name}
-%{_datadir}/%{name}/*
+%doc README THANKS AUTHORS keysyms.dat keysyms.pl hacking/*
+%{_datadir}/%{name}
%{_mandir}/man1/*
-%if %{!?_without_fb:1}0
+%if %{with fb}
%files fb
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/fuse-fb
%endif
-%if %{!?_without_sdl:1}0
+%if %{with sdl}
%files sdl
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/fuse-sdl
%endif
-%ifarch %{ix86} alpha ppc
-%if %{!?_without_svga:1}0
+%if %{with svga}
%files svga
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/fuse-svga
%endif
-%endif
-%if %{!?_without_x11:1}0
+%if %{with x}
%files X11
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/fuse-x11