+# TODO:
+# - Make FlightGear-extra-planes for subset of planes from
+# http://www.flightgear.org/Downloads/aircraft/index.shtml
+
Summary: Free Flight Simulator
-Summary(pl): darmowy symulator lotu
+Summary(pl.UTF-8): darmowy symulator lotu
Name: FlightGear
-Version: 0.9.2
-Release: 1
+Version: 2.12.0
+Release: 0.1
License: GPL
Group: X11/Applications/Games
-Source0: ftp://ftp.flightgear.org/pub/fgfs/Source/%{name}-%{version}.tar.gz
-# Source0-md5: b2087f497fbd6fa02d987e19c96e61e4
-Source1: ftp://ftp.flightgear.org/pub/fgfs/Shared/fgfs-base-%{version}.tar.gz
-# Source1-md5: a097608a86a0de363ff785997495b92d
-Source2: ftp://ftp.flightgear.org/pub/fgfs/Everything-0.7/Base-Packages/fgfs-docs-0.7.7.tar.gz
-# Source2-md5: 31f35d3e63e522565e8990ead99e7507
-Patch0: %{name}-libs.patch
+Source0: ftp://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/Source/flightgear-%{version}.tar.bz2
+# Source0-md5: 23e2de5f311f4cbe94ec3386736ee8a5
+Source1: ftp://flightgear.wo0t.de/ftp/Shared/FlightGear-data-%{version}.tar.bz
+# Source1-md5: 049cfa1f7bc7de528630c2a41c6ad6eb
+#Source2: ftp://ftp.flightgear.org/pub/fgfs/Everything-0.7/Base-Packages/fgfs-docs-0.7.7.tar.gz
+## Source2-md5: 31f35d3e63e522565e8990ead99e7507
+Patch0: flightgear-cmake.patch
URL: http://www.flightgear.org/
+BuildRequires: cmake
+BuildRequires: OpenAL-devel
BuildRequires: OpenGL-devel
-BuildRequires: SimGear-devel >= 0.3.3
-BuildRequires: XFree86-devel
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: findutils
-BuildRequires: glut-devel
+BuildRequires: SimGear-devel = %{version}
+BuildRequires: freeglut-devel
BuildRequires: libstdc++-devel
-BuildRequires: metakit-devel >= 2.4.3
-BuildRequires: plib >= 1.6.0
+BuildRequires: libxml-devel
+BuildRequires: plib-devel >= 1.8.5-3
BuildRequires: zlib-devel
Requires: OpenGL
+Requires: OpenSceneGraph-plugins
+Requires: plib >= 1.8.4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _noautoreqdep libGL.so.1 libGLU.so.1 libGLcore.so.1
flight simulator ideas. We are developing a solid basic sim that can
be expanded and improved upon by anyone interested in contributing.
-%description -l pl
-Projet Flight Gear to wyrafinowany symulator lotów pozwalaj±cy
-rozpowszechniaæ idee tego typu symulacji.
+%description -l pl.UTF-8
+Projekt Flight Gear to wyrafinowany symulator lotów pozwalający
+rozpowszechniać idee tego typu symulacji.
%prep
-%setup -q -a 1 -a 2
+%setup -q -n flightgear-%{version} -a 1
%patch0 -p1
+
find %{name} -name 'CVS' -type d | xargs rm -rf
%build
-rm -f missing
-%{__aclocal}
-%{__autoconf}
-%{__automake}
-%configure \
- --with-network-olk \
- --with-multiplayer
+install -d build
+cd build
+%cmake ../
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_datadir}/games
+install -d $RPM_BUILD_ROOT%{_datadir}/games/%{name}
-%{__make} install \
+%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
echo "#!/bin/sh" > runfgfs
-echo "exec %{_bindir}/fgfs --fg-root=%{_datadir}/games/%{name} \$*" >> runfgfs
+echo "exec %{_bindir}/fgfs --fg-root=%{_datadir}/games/%{name}/fgdata \$*" >> runfgfs
install runfgfs $RPM_BUILD_ROOT%{_bindir}
-cp -a %{name} $RPM_BUILD_ROOT%{_datadir}/games
-cp -R %{name}-%{version}/* $RPM_BUILD_ROOT%{_datadir}/games/%{name}
+cp -R fgdata $RPM_BUILD_ROOT%{_datadir}/games/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS NEWS %{name}/Docs/*
+%doc AUTHORS NEWS docs-mini/*
%attr(755,root,root) %{_bindir}/*
%{_datadir}/games/%{name}
%{_mandir}/*/*