Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > d158e7d869ec377789468fe693b9c21d > files > 4

desmume-0.9.11-2.mga6.tainted.src.rpm

# This should be submitted to tainted as per Mageia's policy on emulators

Name:           desmume
Version:        0.9.11
Release:        %mkrel 2
Summary:        A Nintendo DS emulator
Group:          Emulators
License:        GPLv2+
URL:            http://desmume.org/
Source0:        https://downloads.sourceforge.net/project/desmume/desmume/%{version}/%{name}-%{version}.tar.gz
# Do not look into builddir (Fedora)
Patch0:         desmume-0.9-dontlookinbuilddir.patch
# Use system tinyxml instead of the embedded copy
Patch2:         desmume-0.9.11-tinyxml.patch

BuildRequires:  desktop-file-utils
BuildRequires:  gtkglext-devel
BuildRequires:  intltool
BuildRequires:  pkgconfig(libagg)
BuildRequires:  pkgconfig(libglade-2.0)
BuildRequires:  pkgconfig(lua)
BuildRequires:  pkgconfig(openal)
BuildRequires:  pkgconfig(soundtouch)
BuildRequires:  pkgconfig(zziplib)
BuildRequires:  tinyxml-devel

%description
DeSmuME is a Nintendo DS emulator running homebrew demos and commercial games.

#----------------------------------------------------------------------------

%package gtk
Summary:        A Nintendo DS emulator (Gtk GUI version)
Group:          Emulators
Provides:       %{name} = %{version}-%{release}

%description gtk
DeSmuME is a Nintendo DS emulator running homebrew demos and commercial games.

This is the GTK version.

%files gtk
%doc AUTHORS ChangeLog README README.LIN
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.*
%{_gamesbindir}/%{name}
%{_mandir}/man1/%{name}.1*

#----------------------------------------------------------------------------

%package glade
Summary:        A Nintendo DS emulator (Glade GUI version)
Group:          Emulators
Provides:       %{name} = %{version}-%{release}

%description glade
DeSmuME is a Nintendo DS emulator running homebrew demos and commercial games.

This is the GTK/Glade version.

%files glade -f %{name}-glade.lang
%doc AUTHORS ChangeLog README README.LIN
%{_datadir}/applications/%{name}-glade.desktop
%{_datadir}/pixmaps/%{name}-glade.*
%{_gamesbindir}/%{name}-glade
%{_gamesdatadir}/%{name}-glade/
%{_mandir}/man1/%{name}-glade.1*

#----------------------------------------------------------------------------

%package cli
Summary:        A Nintendo DS emulator (CLI version)
Group:          Emulators
Provides:       %{name} = %{version}-%{release}

%description cli
DeSmuME is a Nintendo DS emulator running homebrew demos and commercial games.

This is the CLI version.

%files cli
%doc AUTHORS ChangeLog README README.LIN
%{_gamesbindir}/%{name}-cli
%{_mandir}/man1/%{name}-cli.1*

#----------------------------------------------------------------------------

%prep
%setup -q
%apply_patches

# Remove bundled tinyxml
rm -rf src/utils/tinyxml

# Fix end-of-line encoding
sed -i 's/\r//' AUTHORS

# Fix file encoding
for txtfile in ChangeLog AUTHORS
do
    iconv --from=ISO-8859-1 --to=UTF-8 $txtfile > tmp
    touch -r $txtfile tmp
    mv tmp $txtfile
done

# Fix glade path
sed -i 's|gladedir = $(datadir)/desmume/glade|gladedir = $(datadir)/games/desmume-glade/|g' src/gtk-glade/Makefile.{am,in}

# Fix gettext package name
sed -i 's|GETTEXT_PACKAGE=desmume|GETTEXT_PACKAGE=desmume-glade|g' configure{,.ac}

%build
%configure2_5x --bindir=%{_gamesbindir} \
               --enable-openal \
               --enable-glade
%make

%install
%makeinstall_std

# Rename installed icon and duplicate it for the glade package
pushd %{buildroot}%{_datadir}/pixmaps/
mv DeSmuME.xpm %{name}.xpm
cp %{name}.xpm %{name}-glade.xpm
popd

# Fix categories and icons of the desktop files
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-edit \
  --remove-category GNOME \
  --remove-category GTK \
  --set-icon %{name} \
  %{buildroot}%{_datadir}/applications/%{name}.desktop

desktop-file-edit \
  --remove-category GNOME \
  --remove-category GTK \
  --set-icon %{name}-glade \
  %{buildroot}%{_datadir}/applications/%{name}-glade.desktop

%find_lang %{name}-glade


%changelog
* Sun Jan 03 2016 luigiwalser <luigiwalser> 0.9.11-2.mga6
+ Revision: 918983
- rebuild for soundtouch

* Mon Sep 07 2015 zezinho <zezinho> 0.9.11-1.mga6.tainted
+ Revision: 873959
- new version 0.9.11

* Wed Oct 15 2014 umeabot <umeabot> 0.9.10-3.mga5.tainted
+ Revision: 749363
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0.9.10-2.mga5.tainted
+ Revision: 678717
- Mageia 5 Mass Rebuild

* Thu May 08 2014 akien <akien> 0.9.10-1.mga5.tainted
+ Revision: 621288
- Add warning that this package should be submitted to tainted
- imported package desmume (based off Fedora's SRPM)