Blob Blame History Raw
Name:		FlightGear
Summary:	The FlightGear Flight Simulator
Version:	2.0.0
Release:	4%{?dist}

License:	GPLv2+
Group:		Amusements/Games
Source:		http://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/Source/FlightGear-%{version}.tar.gz
Source1:	%{name}.desktop
# these icons were previously available from
# http://jrbabcock.home.comcast.net/flightgear/icons
Source2:	fg-16.png
Source3:	fg-32.png
Source4:	fg-48.png
Source5:	fg-64.png
Source6:	fg-128.png
Source7:	COPYING
Patch0:		FlightGear-0.9.10-no-automake-in-configure.patch
Patch1:		FlightGear-2.0.0-requested-visual-unavailable.patch
Patch2:		FlightGear-2.0.0-bug133-AILocalTraffic.patch
Patch3:		FlightGear-2.0.0-bug133-ATCmgr.patch
URL:		http://www.flightgear.org/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	openal-soft-devel >= 1.11.753, SimGear-devel >= %{version}, freeglut-devel
BuildRequires:	OpenSceneGraph-devel >= 2.8.0, boost-devel >= 1.37.0
BuildRequires:	desktop-file-utils
Requires:	FlightGear-data >= 2.0.0, opengl-games-utils

%description
The Flight Gear project is working to create a sophisticated flight
simulator framework for the development and pursuit of interesting
flight simulator ideas. We are developing a solid basic sim that can be
expanded and improved upon by anyone interested in contributing

%prep
%setup -q
# automake shouldn't be called in configure Summary page
%patch0 -p1 -b .no-automake-in-configure
%patch1 -p1 -b .visual-unavailable
%patch2 -p1 -b .bug133
%patch3 -p1 -b .bug133

# make rpmlint happy
find -name \*.h -o -name \*.cpp -o -name \*.cxx -o -name \*.hxx \
	-o -name \*.hpp |xargs chmod -x
rm -f docs-mini/README.electrical.~1.5.~ \
	docs-mini/README.xmlsound.~1.1.1.1.~
for f in docs-mini/README.xmlparticles Thanks
do
	iconv -f iso-8859-1 -t utf-8 -o ${f}.utf8 ${f}
	mv -f ${f}.utf8 ${f}
done
sed -i 's/\r//' docs-mini/AptNavFAQ.FlightGear.html
# remove some unneeded files for the doc section
for ext in Cygwin IRIX Joystick Linux MSVC MSVC8 MacOS SimGear Unix \
	Win32-X autoconf mingw plib src xmlsyntax 
do
	rm -f docs-mini/README.${ext}
done
# icons license file
cp %{SOURCE7} COPYING.icons

%build
%configure
# the application doesn't build with _smp_mflags.
make

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
ln -s opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/fgfs-wrapper

desktop-file-install --vendor="fedora"			\
	--dir=$RPM_BUILD_ROOT%{_datadir}/applications	\
	%{SOURCE1}

# install icons
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps

install -m 0644 %{SOURCE2} \
	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
install -m 0644 %{SOURCE3} \
	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
install -m 0644 %{SOURCE4} \
	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
install -m 0644 %{SOURCE5} \
	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
install -m 0644 %{SOURCE6} \
	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/%{name}.png

%post
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root, -)
%doc AUTHORS COPYING COPYING.icons NEWS README Thanks docs-mini/*
%{_bindir}/*
%{_mandir}/*/*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/*

%changelog
* Sun Jul 18 2010 Fabrice Bellet <fabrice@bellet.info> 2.0.0-4
- Fix a crasher in FGATC::NotifyTransmissionFinished (bz#608523)
  Upstream bug report and suggested workaround :
  http://code.google.com/p/flightgear-bugs/issues/detail?id=133

* Fri Jul 02 2010 Fabrice Bellet <fabrice@bellet.info> 2.0.0-3
- Rebuild with newer OSG

* Wed Jun 02 2010 Fabrice Bellet <fabrice@bellet.info> 2.0.0-2
- Fix a crasher when the requested visual cannot be created

* Fri Feb 26 2010 Fabrice Bellet <fabrice@bellet.info> 2.0.0-1
- New upstream release

* Sun Aug 16 2009 Fabrice Bellet <fabrice@bellet.info> 1.9.1-6
- Switch to openal-soft

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon May 11 2009 Fabrice Bellet <fabrice@bellet.info> 1.9.1-4
- Rebuilt to fix bz#498584

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Feb 15 2009 Fabrice Bellet <fabrice@bellet.info> 1.9.1-2
- rebuild for newer OSG
- gcc44 compilation fix

* Tue Feb 03 2009 Fabrice Bellet <fabrice@bellet.info> 1.9.1-1
- new upstream release

* Tue Jan 06 2009 Fabrice Bellet <fabrice@bellet.info> 1.9.0-1
- new upstream release

* Sun Oct  5 2008 Fabrice Bellet <fabrice@bellet.info> 1.0.0-4
- fixed category of the menu entry (rh#465698)

* Tue May 13 2008 Fabrice Bellet <fabrice@bellet.info> 1.0.0-3
- rebuild with newer plib

* Sun Feb 10 2008 Fabrice Bellet <fabrice@bellet.info> 1.0.0-2
- rebuild with gcc43

* Mon Jan  7 2008 Fabrice Bellet <fabrice@bellet.info> 1.0.0-1
- new upstream release

* Tue Oct  2 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.11-0.4.pre1
- use opengl-games-utils wrapper to show error dialog when DRI is missing

* Sun Sep 23 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.11-0.3.pre1
- update icon cache handling to current guidelines/drafts
- update License tag

* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 0.9.11-0.2.pre1
- Rebuild for selinux ppc32 issue.

* Wed Jun 27 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.11-0.1.pre1
- new upstream (pre-)release

* Wed Apr 18 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-6
- desktop-database update
- add icons from Josh Babcock

* Mon Apr 16 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-5
- doc files cleanup
- remove -fPIC from CXXFLAGS
- add a desktop file (but no dedicated icon is available)
- spec file cleanup

* Sun Apr 08 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-4
- disable parallel build, as it is currently broken. A typo in
  _smp_mflags macro in previous builds prevented the problem from
  showing up
- fixed duplicate BuildRequires

* Sat Apr 07 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-3
- use sed instead of dos2unix to correct end-of-line encoding
- configure should not call automake (BZ#234826)

* Sun Apr 01 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-2
- rebuild against new SimGear

* Tue Mar 20 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-1
- initial packaging