openbve-objectviewer-1.2.0.0-1kkr2009.0.spec
%define distname openbve
%define toolname objectviewer
%define name %{distname}-%{toolname}
%define version 1.2.0.0
%define release %mkrel 1
%define openbvedir %{_gamesdatadir}/%{distname}
%define __gmcs %{_bindir}/gmcs
Summary: Object viewer for openBVE
Summary(ja): openBVE向けのオブジェクトビューア
Name: %{name}
Version: %{version}
Release: %{release}
Source0: http://openbve.trainsimcentral.co.uk/common/tool_%{toolname}_source.zip
# Size : 79,848
# MD5 : 0019dfe93ebecd7012735e850c7c3da9
# SHA-1 : 7e455f4ca74d9ffcb802a607eff95bb470a57607
Source1: %{name}.desktop
# Size : 267
# MD5 : d6c16757f1735227829d5a07863c0f51
# SHA-1 : 7f5e26f2d27d074b353a8c616f38fc135af093f0
Patch: %{name}-1.0.4.0-wmicon.patch
# Size : 1,712
# MD5 : 57a4196ef71afb2ba3a9650741073544
# SHA-1 : 0ce1cfe6103ce8681f10a7a357682cc741d6d90a
URL: http://openbve.trainsimcentral.co.uk/
License: Public Domain-like
Group: Games/Other
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires: mono >= 1.9 mono-winforms >= 1.9 libtaoframework-opengl >= 2.0 libtaoframework-openal >= 2.0 libtaoframework-sdl >= 2.0 openbve >= 1.0.0.0
BuildRequires: mono >= 1.9 mono-winforms >= 1.9 libtaoframework-opengl >= 2.0 libtaoframework-openal >= 2.0 libtaoframework-sdl >= 2.0
BuildArch: noarch
%description
This package provides object viewer for openBVE.
%description -l ja
本パッケージはopenBVE向けのオブジェクトビューアを提供します。
%prep
%setup -q -c
%patch -p1 -b .wmicon
%build
%{__gmcs} \
-out:ObjectViewer.exe \
-lib:/usr/lib/mono/tao-opengl,/usr/lib/mono/tao-openal,/usr/lib/mono/tao-sdl \
-reference:Tao.OpenGl,Tao.OpenAl,Tao.Sdl,System,System.Windows.Forms,System.Drawing \
ObjectViewer/{,Properties/,Parsers/}*.cs
%install
%{__rm} %{buildroot} -fr
# assembly
%{__install} -D -m 755 {,%{buildroot}/%{openbvedir}/}ObjectViewer.exe
# wrapper script
%{__cat} <<EOF > openbve-objectviewer
#! /bin/bash
PATH=/bin:/usr/bin
if [ ! -d \${OPENBVEDIR:-~/openbve} ]; then
mkdir -p \${OPENBVEDIR:-~/openbve}
fi
cd \${OPENBVEDIR:-~/openbve}/
ln -fs %{openbvedir}/ObjectViewer.exe \${OPENBVEDIR:-~/openbve}/
MONO_PATH=/usr/lib/mono/tao-opengl:/usr/lib/mono/tao-openal:/usr/lib/mono/tao-sdl mono ObjectViewer.exe
EOF
%{__install} -D -m 755 {,%{buildroot}/%{_gamesbindir}/}%{distname}-objectviewer
# freedesktop.org menu
%{__install} -D -p -m 644 %{SOURCE1} %{buildroot}/%{_datadir}/applications/%{name}.desktop
%if %{mdkversion} < 200900
%post
%update_desktop_database
%endif
%if %{mdkversion} < 200900
%postun
%clean_desktop_database
%endif
%clean
%{__rm} %{buildroot} -fr
%files
%defattr(-, root, root)
%{_gamesbindir}/*
%{_datadir}/applications/*
%{openbvedir}/*
%changelog
* Sun Jul 26 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.0.0-1kkr2009.0
- new version
* Wed Apr 29 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.4.0-1kkr2009.0
- new version
* Wed Apr 15 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.0.0-1kkr2009.0
- initial build