-# TODO: Fix issue with the WORDS_BIGENDIAN macro of autoconf-2.63
-# fuse built using autotools is unusable because of it.
#
# Conditional build:
%bcond_with svga # svgalib version
%bcond_without fb # framebuffer version
-%bcond_without gtk # GTK+ 2 version
+%bcond_without gtk2 # GTK+ 2 version
%bcond_without gtk3 # GTK+ 3 version
%bcond_without sdl # SDL version
+%bcond_without libao # libao instead of alsa
#
+%define libspectrumver 1.4.2
Summary: Free Unix Spectrum Emulator
Summary(pl.UTF-8): Darmowy uniksowy emulator ZX Spectrum
Name: fuse
-Version: 1.2.1
+Version: 1.5.3
Release: 1
License: GPL v2+
Group: Applications/Emulators
Source0: http://downloads.sourceforge.net/fuse-emulator/%{name}-%{version}.tar.gz
-# Source0-md5: c65a1d65c30263e5888aeae81964f3f3
+# Source0-md5: 8bbee33be6725ee86e8ab1a6b535326a
Source1: ti_m397.rom
# Source1-md5: 8c61b20e1f7666ff80ad7f48bb2b10c0
-Patch0: fuse-1.1.1-2.patch
URL: http://fuse-emulator.sourceforge.net/
BuildRequires: SDL-devel >= 1.2.4
-BuildRequires: alsa-lib-devel
+%{!?with_libao:BuildRequires: alsa-lib-devel}
BuildRequires: autoconf >= 2.59-9
BuildRequires: automake
BuildRequires: glib2-devel >= 1:2.20.0
-%{?with_gtk:BuildRequires: gtk+2-devel >= 2:2.18.0}
-%{?with_gtk3:BuildRequires: gtk+3-devel}
%{?with_fb:BuildRequires: gpm-devel}
+%{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.18.0}
+%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0}
+%{?with_libao:BuildRequires: libao-devel}
BuildRequires: libjsw-devel
+BuildRequires: libmount-devel
BuildRequires: libpng-devel
BuildRequires: libsamplerate-devel
-BuildRequires: libspectrum-devel >= 1.2.0
+BuildRequires: libspectrum-devel >= %{libspectrumver}
BuildRequires: libtool >= 2:2
BuildRequires: libxml2-devel >= 2.0.0
BuildRequires: perl-base
BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.697
+BuildRequires: sed >= 4.0
%{?with_svga:BuildRequires: svgalib-devel}
BuildRequires: xorg-lib-libX11-devel
BuildRequires: zlib-devel
Summary(pl.UTF-8): Darmowy uniksowy emulator ZX Spectrum (pliki wspólne)
Group: Applications/Emulators
Requires: glib2 >= 1:2.20.0
-Requires: libspectrum >= 0.4.0
+Requires: libspectrum >= %{libspectrumver}
Suggests: fdd3000e
%description common
W tym pakiecie znajdują się pliki dla wersji GTK+ 3.
+%package -n bash-completion-fuse
+Summary: Bash completion for FUSE emulator commands
+Summary(pl.UTF-8): Bashowe dopełnianie składni poleceń emulatora FUSE
+Group: Applications/Shells
+Requires: %{name}-common = %{version}-%{release}
+Requires: bash-completion >= 2.0
+
+%description -n bash-completion-fuse
+Bash completion for FUSE emulator commands.
+
+%description -n bash-completion-fuse -l pl.UTF-8
+Bashowe dopełnianie składni poleceń emulatora FUSE.
+
%prep
%setup -q
-%build
-#%patch0 -p1
-#%{__libtoolize}
-#%{__aclocal}
-#%{__autoheader}
-#%{__autoconf}
-#%{__automake}
+# PLD uses per-backend fuse program instead of just "fuse"
+%{__sed} -i -e '/^complete /s/ fuse$/ fuse-fb fuse-gtk fuse-gtk3 fuse-sdl fuse-svga/' data/shell-completion/bash/fuse
+%build
+%define common_opts \\\
+ --disable-silent-rules \\\
+ --with-bash-completion-dir=%{bash_compdir} \\\
+ %{nil}
# SDL
%if %{with sdl}
mkdir build-sdl
cd build-sdl
../%configure \
- --with-sdl \
- --program-suffix=-sdl
+ %{common_opts} \
+ --program-suffix=-sdl \
+ --with-sdl
%{__make}
cd ..
%endif
mkdir build-svga
cd build-svga
../%configure \
- --with-svgalib \
- --program-suffix=-svga
+ %{common_opts} \
+ --program-suffix=-svga \
+ --with-svgalib
%{__make}
cd ..
%endif
mkdir build-fb
cd build-fb
../%configure \
- --with-fb \
- --program-suffix=-fb
+ %{common_opts} \
+ --program-suffix=-fb \
+%if %{with libao}
+ --without-alsa \
+ --with-libao \
+%endif
+ --with-fb
%{__make}
cd ..
%endif
# gtk
-%if %{with gtk}
-mkdir build-gtk
-cd build-gtk
+%if %{with gtk2}
+mkdir build-gtk2
+cd build-gtk2
../%configure \
- --with-gtk \
- --program-suffix=-gtk
+ %{common_opts} \
+ --program-suffix=-gtk \
+%if %{with libao}
+ --without-alsa \
+ --with-libao \
+%endif
+ --with-gtk
%{__make}
cd ..
%endif
mkdir build-gtk3
cd build-gtk3
../%configure \
- --with-gtk \
+ %{common_opts} \
--enable-gtk3 \
- --program-suffix=-gtk3
+ --program-suffix=-gtk3 \
+%if %{with libao}
+ --without-alsa \
+ --with-libao \
+%endif
+ --with-gtk
%{__make}
cd ..
%endif
DESTDIR=$RPM_BUILD_ROOT
%endif
-%if %{with gtk}
-%{__make} -C build-gtk install \
+%if %{with gtk2}
+%{__make} -C build-gtk2 install \
DESTDIR=$RPM_BUILD_ROOT
%endif
DESTDIR=$RPM_BUILD_ROOT
%endif
-install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files common
%defattr(644,root,root,755)
-%doc README THANKS AUTHORS keysyms.dat keysyms.pl hacking/*.txt
+%doc README THANKS AUTHORS ChangeLog keysyms.dat keysyms.pl hacking/*.txt
%{_datadir}/%{name}
%if %{with fb}
%{_mandir}/man1/fuse-fb.1*
%endif
-%if %{with gtk}
+%if %{with gtk2}
%files gtk
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/fuse-gtk
%attr(755,root,root) %{_bindir}/fuse-svga
%{_mandir}/man1/fuse-svga.1*
%endif
+
+%files -n bash-completion-fuse
+%defattr(644,root,root,755)
+%{bash_compdir}/fuse