Damian Wrobel 36f91ce
Name:          crrcsim
d1559a3
Version:       0.9.13
f16bccc
Release:       21%{?dist}
Damian Wrobel 36f91ce
Summary:       Model-Airplane Flight Simulation Program
Damian Wrobel 36f91ce
License:       GPLv2
Damian Wrobel 36f91ce
URL:           http://sourceforge.net/apps/mediawiki/crrcsim/
Damian Wrobel 36f91ce
Source0:       http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
d4cd74c
# upstream report: http://preview.tinyurl.com/bnryakb
d1559a3
Patch0:        %{name}-0.9.13-support-for-platforms-without-sys-io.h.patch
d4cd74c
# aarch64 support added
d4cd74c
# upstream report: http://preview.tinyurl.com/cass62h
d1559a3
Patch1:        %{name}-0.9.13-aarch64-support-added.patch
0a53aba
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1307411
0a53aba
# upstream report: https://sourceforge.net/p/crrcsim/bugs/35/
d1559a3
Patch2:        %{name}-0.9.13-gcc-7-fixes.patch
911fac5
# hg export -r 1554 >crrcsim-0.9.13-issue-41.patch
911fac5
# fix fof rhbz#1575624
911fac5
Patch3:        %{name}-0.9.13-issue-41.patch
a3bfbbc
# Fix compilation with CGAL >5.x
a3bfbbc
# upstream report: https://sourceforge.net/p/crrcsim/bugs/44/
a3bfbbc
Patch4:        %{name}-0.9.13-cgal-header-mode-only.patch
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
# It is only meant for development purposes.
Damian Wrobel 36f91ce
%global build_with_cmake %{?_with_cmake:1}%{!?_with_cmake:0}
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%global the_desktop_file packages/Fedora/CRRCsim.desktop
Damian Wrobel 36f91ce
%global the_icon_file %{_datadir}/%{name}/icons/%{name}.png
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%if %{build_with_cmake}
Damian Wrobel 36f91ce
BuildRequires: cmake
Damian Wrobel 36f91ce
%endif
e7b21bc
BuildRequires: gcc
e7b21bc
BuildRequires: gcc-c++
d1559a3
BuildRequires: /usr/bin/git
Damian Wrobel 36f91ce
BuildRequires: portaudio-devel
Damian Wrobel 36f91ce
BuildRequires: SDL-devel
Damian Wrobel 36f91ce
BuildRequires: freeglut-devel
Damian Wrobel 36f91ce
BuildRequires: plib-devel
b4d3dc2
BuildRequires: libjpeg-turbo-devel
Damian Wrobel 36f91ce
BuildRequires: CGAL-devel
Damian Wrobel 36f91ce
BuildRequires: desktop-file-utils
3235738
BuildRequires: make
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%description
Damian Wrobel 36f91ce
Crrcsim is a model-airplane flight simulation program.
Damian Wrobel 36f91ce
Using it, you can learn how to fly model aircraft, test new aircraft designs,
Damian Wrobel 36f91ce
and improve your skills by practicing on your computer.
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
The flight model is very realistic.
Damian Wrobel 36f91ce
The flight model parameters are calculated based on a 3D representation
Damian Wrobel 36f91ce
of the aircraft. Stalls are properly modeled as well.
Damian Wrobel 36f91ce
Model control is possible with your own RC transmitter, or any input device
Damian Wrobel 36f91ce
such as joystick, mouse, keyboard.
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%package doc
Damian Wrobel 36f91ce
Summary:       Documentation for %{name}
Damian Wrobel 36f91ce
BuildArch:     noarch
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%description doc
Damian Wrobel 36f91ce
Documentation for %{name} package.
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%prep
d1559a3
%autosetup -S git
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
# Correct EOL.
Damian Wrobel 36f91ce
for i in \
Damian Wrobel 36f91ce
    documentation/input_method/PARALLEL_1_to_3/crrcsim_at90s1200.hex \
d1559a3
    documentation/models/*.txt \
Damian Wrobel 36f91ce
    documentation/Install_Win32.txt \
Damian Wrobel 36f91ce
    documentation/dlportio.txt; do
Damian Wrobel 36f91ce
        sed -i 's#\r##g' $i;
Damian Wrobel 36f91ce
done
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
# Remove executable permission.
Damian Wrobel 36f91ce
chmod a-x src/mod_landscape/heightdata.h
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
# Correct file encoding.
Damian Wrobel 36f91ce
for i in documentation/thermals/table*.cpp; do
Damian Wrobel 36f91ce
  iconv -f iso-8859-1 -t utf-8 -o $i{.utf8,} && mv $i{.utf8,}
Damian Wrobel 36f91ce
done
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
# Desktop file: correct the icon file location.
Damian Wrobel 36f91ce
sed -i 's#^\(Icon.*=\).*#\1%{the_icon_file}#g' %{the_desktop_file}
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
# Desktop file: correct categories.
Damian Wrobel 36f91ce
# Reported upstream: http://preview.tinyurl.com/cep8rvp
Damian Wrobel 36f91ce
sed -i 's#^\(Categories=\).*#\1Game;Simulation;#g' %{the_desktop_file}
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
# Desktop file: remove deprecated "Encoding" key.
Damian Wrobel 36f91ce
# Reported upstream: http://preview.tinyurl.com/cep8rvp
Damian Wrobel 36f91ce
sed -i 's#^Encoding=.*##g' %{the_desktop_file}
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
# Minimal approach to satisfy the linker.
Damian Wrobel 36f91ce
# Reported upstream: http://preview.tinyurl.com/d3cg4s2
d1559a3
sed -i 's#-lboost_thread-mt#-lboost_thread#g' Makefile.in configure
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%if %{build_with_cmake}
Damian Wrobel 36f91ce
# Remove reference to not existing file.
Damian Wrobel 36f91ce
sed -i 's#\(.*m44_test.*\)#\#\1#g' src/mod_math/CMakeLists.txt
Damian Wrobel 36f91ce
%endif
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%build
Damian Wrobel 36f91ce
%if %{build_with_cmake}
Damian Wrobel 36f91ce
 mkdir -p build
Damian Wrobel 36f91ce
 pushd build
Damian Wrobel 36f91ce
 %cmake ..
Damian Wrobel 36f91ce
 make %{?_smp_mflags}
Damian Wrobel 36f91ce
 popd
Damian Wrobel 36f91ce
%else
Damian Wrobel 36f91ce
 %configure
Damian Wrobel 36f91ce
 make %{?_smp_mflags}
Damian Wrobel 36f91ce
%endif
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%install
Damian Wrobel 36f91ce
make DESTDIR=%{buildroot} install
Damian Wrobel 36f91ce
desktop-file-install \
Damian Wrobel 36f91ce
    --dir=%{buildroot}%{_datadir}/applications \
Damian Wrobel 36f91ce
    %{the_desktop_file}
Damian Wrobel 36f91ce
rm -f %{buildroot}%{_datadir}/%{name}/icons/%{name}.{ico,xpm}
Damian Wrobel 36f91ce
%find_lang %{name} --with-man
Damian Wrobel 36f91ce
939256f
# adding to installed docs in order to avoid using %%doc magic
939256f
for f in AUTHORS COPYING HISTORY ; do
939256f
    cp -p $f %{buildroot}%{_docdir}/%{name}/${f}
939256f
done
939256f
Richard Hughes 08e3d3a
# Register as an application to be visible in the software center
Richard Hughes 08e3d3a
#
Richard Hughes 08e3d3a
# NOTE: It would be *awesome* if this file was maintained by the upstream
Richard Hughes 08e3d3a
# project, translated and installed into the right place during `make install`.
Richard Hughes 08e3d3a
#
Richard Hughes 08e3d3a
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
Richard Hughes 08e3d3a
#
Richard Hughes 08e3d3a
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
Richard Hughes 08e3d3a
cat > $RPM_BUILD_ROOT%{_datadir}/appdata/CRRCsim.appdata.xml <
Richard Hughes 08e3d3a
Richard Hughes 08e3d3a
Richard Hughes 08e3d3a
Richard Hughes 08e3d3a
BugReportURL: https://sourceforge.net/p/crrcsim/feature-requests/37/
Richard Hughes 08e3d3a
SentUpstream: 2014-07-11
Richard Hughes 08e3d3a
-->
Richard Hughes 08e3d3a
<application>
Richard Hughes 08e3d3a
  <id type="desktop">CRRCsim.desktop</id>
Richard Hughes 08e3d3a
  <metadata_license>CC0-1.0</metadata_license>
Richard Hughes 08e3d3a
  <name>Charles River RC Flight Simulator</name>
Richard Hughes 08e3d3a
  <summary>Flight simulator for model remote controlled aircraft</summary>
Richard Hughes 08e3d3a
  <description>
Richard Hughes 08e3d3a
    

Richard Hughes 08e3d3a
      The Charles River RC Flight Simulator (CRRCSim) is a flight simulator to
Richard Hughes 08e3d3a
      test fly model aircraft.
Richard Hughes 08e3d3a
      CRRCSim comes with over 15 different types of model gliders and planes, and
Richard Hughes 08e3d3a
      lets you fly in 3 different locations.
Richard Hughes 08e3d3a
    

Richard Hughes 08e3d3a
  </description>
Richard Hughes 08e3d3a
  <url type="homepage">https://sourceforge.net/projects/crrcsim/</url>
Richard Hughes 08e3d3a
  <screenshots>
Richard Hughes 08e3d3a
    <screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CRRCsim/a.png</screenshot>
Richard Hughes 08e3d3a
    <screenshot>https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CRRCsim/b.png</screenshot>
Richard Hughes 08e3d3a
  </screenshots>
Richard Hughes 08e3d3a
  
Richard Hughes 08e3d3a
  <updatecontact>someone_who_cares@upstream_project.org</updatecontact>
Richard Hughes 08e3d3a
   -->
Richard Hughes 08e3d3a
</application>
Richard Hughes 08e3d3a
EOF
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%files -f %{name}.lang
Damian Wrobel 36f91ce
%{_bindir}/crrcsim
Richard Hughes 08e3d3a
%{_datadir}/appdata/*.appdata.xml
Damian Wrobel 36f91ce
%{_datadir}/applications/CRRCsim.desktop
939256f
%{_datadir}/%{name}/
Damian Wrobel 36f91ce
%{_mandir}/man1/%{name}.1*
939256f
%dir %{_docdir}/%{name}/
939256f
%{_docdir}/%{name}/AUTHORS
939256f
%{_docdir}/%{name}/COPYING
939256f
%{_docdir}/%{name}/HISTORY
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%files doc
939256f
# all documentation in this package (including the license)
939256f
%{_docdir}/%{name}/
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
%changelog
f16bccc
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-21
f16bccc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
f16bccc
3799fbd
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-20
3799fbd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
3799fbd
8793638
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-19
8793638
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
8793638
155ffe4
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-18
155ffe4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
155ffe4
640148d
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-17
640148d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
640148d
2edead2
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-16
2edead2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
2edead2
c31320b
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-15
c31320b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
c31320b
271dcae
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-14
271dcae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
271dcae
6c2b77d
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-13
6c2b77d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
6c2b77d
a3bfbbc
* Fri Jan 31 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.13-12
a3bfbbc
- Use CGAL (>=5.0x) in header mode only
a3bfbbc
5e73772
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-11
5e73772
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
5e73772
bab8eeb
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-10
bab8eeb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
bab8eeb
2416092
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-9
2416092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
2416092
69387e7
* Thu Jan 24 2019 Jonathan Wakely <jwakely@redhat.com> - 0.9.13-8
69387e7
- Rebuilt for Boost 1.69
69387e7
bf6d81f
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-7
bf6d81f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
bf6d81f
911fac5
* Tue Jul 10 2018 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.13-6
911fac5
- Fix for rhbz#1575624
911fac5
e7b21bc
* Sat Feb 24 2018 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.13-5
e7b21bc
- Add missing BR (gcc, gcc-c++).
e7b21bc
a5b474d
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.13-4
a5b474d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a5b474d
c758687
* Tue Jan 23 2018 Jonathan Wakely <jwakely@redhat.com> - 0.9.13-3
c758687
- Rebuilt for Boost 1.66
c758687
8406346
* Thu Jan 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.9.13-2
8406346
- Remove obsolete scriptlets
8406346
d1559a3
* Thu Dec 21 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.13-1
d1559a3
- Update to the latest avilable version (rhbz#1510107)
d1559a3
0c1815a
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-29
0c1815a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
0c1815a
14c3558
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-28
14c3558
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
14c3558
49df67b
* Tue Jul 18 2017 Jonathan Wakely <jwakely@redhat.com> - 0.9.12-27
49df67b
- Rebuilt for Boost 1.64
49df67b
21491c5
* Sun Jun 04 2017 Miro Hrončok <mhroncok@redhat.com> - 0.9.12-26
21491c5
- Rebuilt for new CGAL
21491c5
20f6e12
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-25
20f6e12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
20f6e12
d301755
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-24
d301755
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d301755
e2a68e7
* Sat Jan 28 2017 Jonathan Wakely <jwakely@redhat.com> - 0.9.12-23
e2a68e7
- Rebuilt for Boost 1.63
e2a68e7
10e19ee
* Mon Sep 26 2016 Miro Hrončok <mhroncok@redhat.com> - 0.9.12-22
10e19ee
- Rebuilt for new CGAL
10e19ee
0a53aba
* Tue Mar 29 2016 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.12-21
0a53aba
- Fixes gcc 6 compilation, RHBZ#1307411
0a53aba
e14ee66
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-20
e14ee66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e14ee66
24f1bce
* Mon Jan 18 2016 Jonathan Wakely <jwakely@redhat.com> - 0.9.12-19
24f1bce
- Rebuilt for Boost 1.60
24f1bce
088f7de
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 0.9.12-18
088f7de
- Rebuilt for Boost 1.59
088f7de
30fbdbd
* Wed Aug 05 2015 Jonathan Wakely <jwakely@redhat.com> 0.9.12-17
30fbdbd
- Rebuilt for Boost 1.58
30fbdbd
bf688e5
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-16
bf688e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
bf688e5
3c74a93
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.9.12-15
3c74a93
- Rebuilt for GCC 5 C++11 ABI change
3c74a93
Richard Hughes 08e3d3a
* Thu Mar 26 2015 Richard Hughes <rhughes@redhat.com> - 0.9.12-14
Richard Hughes 08e3d3a
- Add an AppData file for the software center
Richard Hughes 08e3d3a
3c2057c
* Fri Mar 06 2015 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.12-13
3c2057c
- Rebuild for libCGAL.so.11.
3c2057c
120d75b
* Mon Feb 09 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 0.9.12-12
120d75b
- Rebuild for boost-1.57.
120d75b
1c2c315
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-11
1c2c315
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
1c2c315
d920ce0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-10
d920ce0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d920ce0
52a7e7d
* Fri May 23 2014 David Tardon <dtardon@redhat.com> - 0.9.12-9
52a7e7d
- rebuild for boost 1.55.0
52a7e7d
b4d3dc2
* Mon Apr 28 2014 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.12-8
b4d3dc2
- BR corrected.
b4d3dc2
939256f
* Sat Dec 14 2013 Michael Schwendt <mschwendt@fedoraproject.org>
939256f
- Fix duplicate documentation (#1001277)
939256f
- Simplify the %%files list
939256f
- Drop base package dependency from -doc subpackage
939256f
f80a558
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-7
f80a558
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f80a558
Petr Machata 495dd01
* Sun Jul 28 2013 Petr Machata <pmachata@redhat.com> - 0.9.12-6
Petr Machata 495dd01
- Rebuild for boost 1.54.0
Petr Machata a261e40
- Link against -lboost_thread, the -mt variant is not shipped anymore.
Petr Machata 495dd01
d4cd74c
* Sat Mar 23 2013 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.12-5
d4cd74c
- aarch64 support added, fixes #925200
d4cd74c
- updating icon cache scriplets added
d4cd74c
bcdc020
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 0.9.12-4
bcdc020
- Rebuild for Boost-1.53.0
bcdc020
14357e1
* Fri Feb 01 2013 Dan Horák <dan[at]danny.cz> - 0.9.12-3
14357e1
- fix build on platforms without io.h
14357e1
Damian Wrobel 36f91ce
* Tue Jan 29 2013 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.12-2
Damian Wrobel 36f91ce
- doc subpackage BuildArch adn Requires corrected.
Damian Wrobel 36f91ce
Damian Wrobel 36f91ce
* Tue Jun 12 2012 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.9.12-1
Damian Wrobel 36f91ce
- initial RPM release.