openbve-1.2.6.3-1kkr2010.0.spec
%define name openbve
%define version 1.2.6.3
%define release %mkrel 1
%define openbvedir %{_gamesdatadir}/%{name}
Summary: BVE-compatible train driving simulator with new features
Summary(ja): BVE互換で新機能も備えた鉄道運転シミュレータ
Name: %{name}
Version: %{version}
Release: %{release}
Source0: http://openbve.trainsimcentral.co.uk/common/%{name}_stable_source.zip
# Size : 305,200
# MD5 : fe70ae4a14dc05d6e15d04fd3e391f00
# SHA-1 : f4b74354323e16dac2b27aee150af00cf7084e78
Source1: http://openbve.trainsimcentral.co.uk/common/%{name}_stable.zip
# Size : 1,786,036
# MD5 : 26d256ba9859e38e7845bd155ec78e18
# SHA-1 : 9f282fa3bf0409415bc4d65f429d81485d92ba60
Source2: %{name}.desktop
# Size : 288
# MD5 : c8e3585d2faabc427a6ab9dcfbfc9a93
# SHA-1 : 0b5f63286f3914f3dc75adb14f440f7bc0731f04
Patch: %{name}-1.0.3.0-wmicon.patch
# Size : 1,494
# MD5 : 2efe7894616d494595c2cbc0dadacaaf
# SHA-1 : 4ed0e985d900e1cf0ee88e62a56d279511ee0ad7
URL: http://openbve.trainsimcentral.co.uk/
License: Public Domain-like
Group: Games/Other
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: mono >= 1.9 mono-winforms >= 1.9 libtaoframework-opengl >= 2.0 libtaoframework-openal >= 2.0 libtaoframework-sdl >= 2.0
BuildArch: noarch
%description
openBVE is a license-free, open source, free of charge train driving simulator.
%description -l ja
openBVEはライセンスフリーでオープンソースで無料な鉄道運転シミュレータです。
%prep
%setup -q -c
%{__rm} Readme.txt
%setup -q -c -T -D -a 1
%patch -p1 -b .wmicon
%build
gmcs \
-out:OpenBve.exe \
-lib:%{_prefix}/lib/mono/tao-opengl,%{_prefix}/lib/mono/tao-openal,%{_prefix}/lib/mono/tao-sdl \
-reference:Tao.OpenGl,Tao.OpenAl,Tao.Sdl,System,System.Windows.Forms,System.Drawing \
openBVE/OpenBve/{,Properties/,Parsers/}*.cs
%install
%{__rm} %{buildroot} -fr
# assembly
%{__install} -D -m 755 {,%{buildroot}/%{openbvedir}/}OpenBve.exe
# data
for d in $(find Data -type f | %{__sed} 's,/[^/]*$,,' | sort -u); do
%{__install} -d %{buildroot}/%{openbvedir}/${d}
%{__install} -p -m 644 ${d}/*.* %{buildroot}/%{openbvedir}/${d}/
done
# wrapper script
%{__cat} <<EOF > openbve
#! /bin/bash
PATH=/bin:%{_prefix}/bin
if [ ! -d \${OPENBVEDIR:-~/openbve} ]; then
mkdir -p \${OPENBVEDIR:-~/openbve}/{Data,Train,Settings} \${OPENBVEDIR:-~/openbve}/Railway/{Object,Route,Sound}
fi
cd \${OPENBVEDIR:-~/openbve}/
for d in \$(find %{openbvedir}/Data -type f | sed 's,/[^/]*\$,,' | sort -u); do
mkdir \$(echo \${d} | sed 's:%{openbvedir}/::') -p
ln -s \${d}/*.* \$(echo \${d} | sed 's:%{openbvedir}/::')/ 2> /dev/null
done
if [ "x\$(md5sum %{openbvedir}/OpenBve.exe | awk -F " " '{print \$1}')" != "x\$(md5sum \${OPENBVEDIR:-~/openbve}/OpenBve.exe 2> /dev/null | awk -F " " '{print \$1}')" ]; then
cp %{openbvedir}/OpenBve.exe \${OPENBVEDIR:-~/openbve}/
fi
for f in Data/Languages/*.cfg; do
test -f \${f} || rm \${f}
done
MONO_PATH=%{_prefix}/lib/mono/tao-opengl:%{_prefix}/lib/mono/tao-openal:%{_prefix}/lib/mono/tao-sdl mono OpenBve.exe
EOF
%{__install} -D -m 755 {,%{buildroot}/%{_gamesbindir}/}openbve
# freedesktop.org menu
%{__install} -D -p -m 644 %{SOURCE2} %{buildroot}/%{_datadir}/applications/%{name}.desktop
# icon
%{__install} -D -p -m 644 Data/Menu/logo.png %{buildroot}/%{_datadir}/pixmaps/%{name}.png
# doc
%{__xz} *.txt
%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}/openbve
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{openbvedir}/
%doc *.txt.*
%changelog
* Mon May 03 2010 kakurasan <kakurasan AT gmail DOT com> 1.2.6.3-1kkr2010.0
- new version
* Sun Mar 14 2010 kakurasan <kakurasan AT gmail DOT com> 1.2.6.0-1kkr2010.0
- new version
* Mon Feb 15 2010 kakurasan <kakurasan AT gmail DOT com> 1.2.5.1-1kkr2010.0
- new version
* Mon Jan 25 2010 kakurasan <kakurasan AT gmail DOT com> 1.2.5.0-1kkr2010.0
- new version
* Mon Jan 04 2010 kakurasan <kakurasan AT gmail DOT com> 1.2.3.3-1kkr2010.0
- new version
* Tue Dec 15 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.3.2-1kkr2010.0
- new version
* Tue Dec 01 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.3.1-1kkr2010.0
- new version
* Wed Nov 18 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.3.0-1kkr2010.0
- new version
* Tue Nov 17 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.2.0-2kkr2010.0
- drop unneeded Requires
* Tue Sep 29 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.2.0-1kkr2009.[01]
- new version
* Fri Sep 04 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.1.3-1kkr2009.[01]
- new version
* Mon Aug 31 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.1.2-1kkr2009.[01]
- new version
* Sat Aug 29 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.1.1-1kkr2009.[01]
- new version
* Mon Aug 17 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.1.0-1kkr2009.[01]
- new version
* Thu Aug 06 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.0.3-1kkr2009.[01]
- new version
* Sun Aug 02 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.0.1-1kkr2009.[01]
- new version
* Sun Jul 26 2009 kakurasan <kakurasan AT gmail DOT com> 1.2.0.0-1kkr2009.[01]
- new version
* Sat Jul 18 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.7.3-1kkr2009.0
- new version
- update wrapper script, avoid "Could not find file" error
* Fri Jun 19 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.7.2-1kkr2009.0
- new version
* Sun May 31 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.6.2-1kkr2009.1
- new version
* Thu May 28 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.6.0-1kkr2009.1
- new version
* Thu May 07 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.5.0-1kkr2009.1
- new version
* Wed Apr 29 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.4.1-1kkr2009.0
- new version
* Tue Apr 14 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.3.0-1kkr2009.0
- new version
- update URL
- fix BuildRequires(missing mono-winforms)
* Sun Apr 05 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.2.0-1kkr2009.0
- new version
* Mon Mar 30 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.1.0-1kkr2009.0
- new version
- replace "/usr" with "%{_prefix}"
* Thu Mar 26 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.0.0-2kkr2009.0
- fix wmicon mask
* Mon Mar 23 2009 kakurasan <kakurasan AT gmail DOT com> 1.0.0.0-1kkr2009.0
- new version
* Wed Feb 18 2009 kakurasan <kakurasan AT gmail DOT com> 0.9.5.5-1kkr2009.0
- new version
* Mon Feb 02 2009 kakurasan <kakurasan AT gmail DOT com> 0.9.5.0-1kkr2009.0
- new version
* Wed Jan 30 2009 kakurasan <kakurasan AT gmail DOT com> 0.9.4.2-1kkr2009.0
- new version
* Wed Jan 28 2009 kakurasan <kakurasan AT gmail DOT com> 0.9.4.0-1kkr2009.0
- new version
* Tue Jan 20 2009 kakurasan <kakurasan AT gmail DOT com> 0.9.3.7-1kkr2009.0
- new version
* Wed Jan 14 2009 kakurasan <kakurasan AT gmail DOT com> 0.9.3.3-1kkr2009.0
- initial build