Name: crrcsim Version: 0.9.12 Release: 2%{?dist} Group: Amusements/Games Summary: Model-Airplane Flight Simulation Program License: GPLv2 URL: http://sourceforge.net/apps/mediawiki/crrcsim/ Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz # It is only meant for development purposes. %global build_with_cmake %{?_with_cmake:1}%{!?_with_cmake:0} %global the_desktop_file packages/Fedora/CRRCsim.desktop %global the_icon_file %{_datadir}/%{name}/icons/%{name}.png %if %{build_with_cmake} BuildRequires: cmake %endif BuildRequires: portaudio-devel BuildRequires: SDL-devel BuildRequires: freeglut-devel BuildRequires: plib-devel BuildRequires: openjpeg-devel BuildRequires: CGAL-devel BuildRequires: desktop-file-utils %description Crrcsim is a model-airplane flight simulation program. Using it, you can learn how to fly model aircraft, test new aircraft designs, and improve your skills by practicing on your computer. The flight model is very realistic. The flight model parameters are calculated based on a 3D representation of the aircraft. Stalls are properly modeled as well. Model control is possible with your own RC transmitter, or any input device such as joystick, mouse, keyboard. %package doc Group: Documentation Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name} package. %prep %setup -q # Correct EOL. for i in \ documentation/input_method/PARALLEL_1_to_3/crrcsim_at90s1200.hex \ documentation/models/Readmefirst_Crossfire.txt \ documentation/models/Readmefirst_Erwin.txt \ documentation/Install_Win32.txt \ documentation/dlportio.txt; do sed -i 's#\r##g' $i; done # Remove executable permission. chmod a-x src/mod_landscape/heightdata.h # Correct file encoding. for i in documentation/thermals/table*.cpp; do iconv -f iso-8859-1 -t utf-8 -o $i{.utf8,} && mv $i{.utf8,} done # Desktop file: correct the icon file location. sed -i 's#^\(Icon.*=\).*#\1%{the_icon_file}#g' %{the_desktop_file} # Desktop file: correct categories. # Reported upstream: http://preview.tinyurl.com/cep8rvp sed -i 's#^\(Categories=\).*#\1Game;Simulation;#g' %{the_desktop_file} # Desktop file: remove deprecated "Encoding" key. # Reported upstream: http://preview.tinyurl.com/cep8rvp sed -i 's#^Encoding=.*##g' %{the_desktop_file} # Minimal approach to satisfy the linker. # Reported upstream: http://preview.tinyurl.com/d3cg4s2 sed -i 's#\($(GLU_LIBS)\)#\1\ -lgmp\ -lboost_thread-mt#' Makefile.in %if %{build_with_cmake} # Remove reference to not existing file. sed -i 's#\(.*m44_test.*\)#\#\1#g' src/mod_math/CMakeLists.txt %endif %build %if %{build_with_cmake} mkdir -p build pushd build %cmake .. make %{?_smp_mflags} popd %else %configure make %{?_smp_mflags} %endif %install make DESTDIR=%{buildroot} install desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications \ %{the_desktop_file} rm -f %{buildroot}%{_datadir}/%{name}/icons/%{name}.{ico,xpm} %find_lang %{name} %find_lang %{name} --with-man %files -f %{name}.lang %doc AUTHORS COPYING HISTORY %{_bindir}/crrcsim %{_datadir}/applications/CRRCsim.desktop %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/icons %{_datadir}/%{name}/icons/%{name}.png %dir %{_datadir}/%{name}/models %{_datadir}/%{name}/models/*.xml %dir %{_datadir}/%{name}/models/battery %{_datadir}/%{name}/models/battery/*.xml %dir %{_datadir}/%{name}/models/engine %{_datadir}/%{name}/models/engine/*.xml %dir %{_datadir}/%{name}/objects %{_datadir}/%{name}/objects/*.ac %{_datadir}/%{name}/objects/*.3ds %dir %{_datadir}/%{name}/scenery %{_datadir}/%{name}/scenery/*.xml %dir %{_datadir}/%{name}/sounds %{_datadir}/%{name}/sounds/*.wav %dir %{_datadir}/%{name}/sounds/f3f %dir %{_datadir}/%{name}/sounds/f3f/default %{_datadir}/%{name}/sounds/f3f/default/*.wav %dir %{_datadir}/%{name}/sounds/f3f/sport %{_datadir}/%{name}/sounds/f3f/sport/*.wav %dir %{_datadir}/%{name}/textures %{_datadir}/%{name}/textures/*.bw %{_datadir}/%{name}/textures/*.jpg %{_datadir}/%{name}/textures/*.rgb %{_datadir}/%{name}/textures/*.txf %{_mandir}/man1/%{name}.1* %files doc %doc %{_defaultdocdir}/%{name} %changelog * Tue Jan 29 2013 Damian Wrobel - 0.9.12-2 - doc subpackage BuildArch adn Requires corrected. * Tue Jun 12 2012 Damian Wrobel - 0.9.12-1 - initial RPM release.