Blob Blame History Raw
Name:           openmsx
Version:        0.6.2
Release:        4%{?dist}
Summary:        An emulator for the MSX home computer system
Group:          Applications/Emulators
License:        GPL+
Patch0:         openmsx-0.6.1-installbase.patch
Patch1:         openmsx-0.6.1-flavour.patch
Patch2:         openmsx-0.6.1-datadir.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  desktop-file-utils
BuildRequires:  docbook-utils
BuildRequires:  glew-devel >= 1.3.2
BuildRequires:  ImageMagick
BuildRequires:  jack-audio-connection-kit-devel
BuildRequires:  libpng-devel
BuildRequires:  libxml2-devel
BuildRequires:  SDL_image-devel
BuildRequires:  tcl-devel >= 8.4.0
BuildRequires:  zlib-devel
Requires:       cbios-%{name}
Requires:       hicolor-icon-theme

openMSX is an emulator for the MSX home computer system. Its goal is to emulate
all aspects of the MSX with 100% accuracy.

%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1

# Verbose compilation
sed -i 's/@$(COMPILE_ENV)/$(COMPILE_ENV)/' build/

# Correct some permissions
chmod 0644 share/extensions/rs232/hardwareconfig.xml share/extensions/gfx9000/hardwareconfig.xml \

# Make the custom flavour module, so we can use RPM OPT FLAGS here
cat > build/ << EOF
# $Id:,v 1.1 2006/08/06 06:32:02 mthuurne Exp $
# RPM opt flavour:

# Opt flags.

# Dont strip exe, let rpm do it and save debug info

# Move documentation to a sensible location
echo 'System ROM Dir: %{_datadir}/%{name}/systemroms' > systemroms-README
cat share/systemroms/README >> doc/systemroms-README
rm -f share/systemroms/README

echo '%{_datadir}/%{name}/machines/Boosted_MSX2_EN/roms' > Boosted_MSX2_EN-roms-README
cat share/machines/Boosted_MSX2_EN/roms/README >> doc/Boosted_MSX2_EN-roms-README
rm -f share/machines/Boosted_MSX2_EN/roms/README

echo '%{_datadir}/%{name}/machines/Boosted_MSX2_EN' > Boosted_MSX2_EN-README
cat share/machines/Boosted_MSX2_EN/README >> doc/Boosted_MSX2_EN-README
rm -f share/machines/Boosted_MSX2_EN/README

make %{?_smp_mflags}

# Build desktop icon
cat >%{name}.desktop <<EOF
[Desktop Entry]
GenericName=: An MSX Emulator

# Build the man page
docbook2man doc/openmsx.sgml -o ./
mv OPENMSX.1 openmsx.1

#Build icon
convert -resize 192x192 -extent 192x192 -transparent '#000000' \
    -roll '-0x+65' share/skins/ConsoleBackground.png %{name}.png

rm -rf %{buildroot}
# Some clean ups before installing
rm -f share/systemroms/.cvsignore doc/ doc/openmsx.sgml \
      doc/manual/ share/extensions/msxdos2/roms/SHA1SUMS

mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/192x192/apps
mkdir -p %{buildroot}%{_mandir}/man1
install -pm 0755 derived/%{name} %{buildroot}%{_bindir}
install -pm 0644 openmsx.1 %{buildroot}%{_mandir}/man1
cp -a share/extensions share/keymaps share/machines share/scripts \
     share/shaders share/skins share/systemroms %{buildroot}%{_datadir}/%{name}
install -pm 0644 share/softwaredb.xml %{buildroot}%{_datadir}/%{name}
install -pm 0644 share/init.tcl %{buildroot}%{_datadir}/%{name}
install -pm 0644 share/settings.xml %{buildroot}%{_sysconfdir}/%{name}
ln -s --target-directory=%{buildroot}%{_datadir}/%{name} \
install -pm 0755 %{name}.png %{buildroot}%{_datadir}/icons/hicolor/192x192/apps

rm -f doc/
rm -f doc/manual/

desktop-file-install --vendor fedora \
                     --dir %{buildroot}%{_datadir}/applications \

rm -rf %{buildroot}

touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/settings.xml
%doc AUTHORS ChangeLog GPL README doc/*

* Mon Aug 27 2007 Ian Chapman <packages[AT]> 0.6.2-4
- License field corrected

* Sun Aug 26 2007 Ian Chapman <packages[AT]> 0.6.2-3
- Migration to Fedora
- License field changed due to new guidelines

* Sun May 06 2007 Ian Chapman <packages[AT]> 0.6.2-2
- Rebuild for glew 1.4.0

* Fri Apr 27 2007 Ian Chapman <packages[AT]> 0.6.2-1
- Upgrade to 0.6.2
- Increased compilation verbosity

* Sun Mar 11 2007 Ian Chapman <packages[AT]> 0.6.1-2
- Dropped dribble-menus requirement, due to be obsoleted
- Changed .desktop category to Game;Emulator;
- Create the desktop icon from the skins (instead of using our own)

* Sun Aug 06 2006 Ian Chapman <packages[AT]> 0.6.1-1
- Initial release