Blob Blame Raw
Name:		SimGear
Version:	2.4.0
Release:	4%{?dist}
License:	GPLv2+
Group:		System Environment/Libraries
Summary:	Simulation library components
URL:		http://simgear.sourceforge.net
Source0:	http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/simgear-%{version}.tar.bz2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0:		SimGear-2.4.0-shared.patch
Patch1:		SimGear-2.4.0-dont-build-noinst-programs.patch
Patch2:		SimGear-2.4.0-dependencies.patch
Patch4:		SimGear-2.0.0-more-archs.patch
Patch5:		SimGear-2.4.0-expat.patch
Patch6:		simgear-2.6.0-check-for-%n-in-format-string.patch
Patch100:	SimGear-1.9.0-headers.patch
BuildRequires:	openal-soft-devel, plib-devel >= 1.8.5
BuildRequires:	OpenSceneGraph-devel >= 2.8.0
BuildRequires:	boost-devel >= 1.37.0
BuildRequires:	libXt-devel, libXext-devel
BuildRequires:	libXi-devel, libXmu-devel, freeglut-devel, freealut-devel
BuildRequires:	zlib-devel, libjpeg-devel
BuildRequires:	automake autoconf intltool libtool
BuildRequires:	expat-devel, apr-devel

%description
SimGear is a set of open-source libraries designed to be used as building
blocks for quickly assembling 3d simulations, games, and visualization
applications.

%package devel
Group: Development/Libraries
Summary: Development libraries and headers for SimGear
Requires: %{name} = %{version}-%{release}
Requires: plib-devel, libjpeg-devel, zlib-devel, libGL-devel
Requires: freealut-devel, libX11-devel, expat-devel

%description devel
Development headers and libraries for building applications against 
SimGear.

%prep
%setup -q -n simgear-%{version}
# automake / autoconf input file changes
%patch0 -p1
# dont build programs that won't be installed
# (as a side effect, this allows parallel build to work)
%patch1 -p1
# add a minimal set of dependencies between shared libs
%patch2 -p1
# Fix compiling on pcc and alpha
%patch4 -p1
# Use expat
%patch5 -p1 -b .expat
# check for %n in format string (CVE-2012-2090)
%patch6 -p1 -b .checkforn

# makes rpmlint happy
find -name \*.cxx -o -name \*.hxx | xargs chmod -x

# expat covers most of the files in simgear/xml, except for the custom ones (easyxml.*))
rm -rf simgear/xml/*.h simgear/xml/*.c

%build
mkdir m4
autoreconf -i
%configure --with-jpeg-factory --disable-static
# Don't use rpath!   
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# We do not want -lm by default!
sed -i 's/ -lm / /g' libtool
# The libs override are to avoid unnecessary linking with -lm
make %{?_smp_mflags} base_LIBS= openal_LIBS="-lalut -lopenal" \
  opengl_LIBS="-lglut -lGLU -lGL -lXmu -lXt -lSM -lICE -lXi -lXext -lX11" expat_LIBS="-lexpat"

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
# Don't really need the .la files.
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la

# These two headers have a useless conditional when they're not internal.
# This cleans them up.
cd $RPM_BUILD_ROOT%{_includedir}/simgear/
patch -p0 < %{PATCH100}

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc COPYING AUTHORS NEWS
%{_libdir}/lib*-%{version}*.so

%files devel
%defattr(-,root,root,-)
%{_includedir}/simgear/
%{_libdir}/libsgbucket.so
%{_libdir}/libsgbvh.so
%{_libdir}/libsgdebug.so
%{_libdir}/libsgenvironment.so
%{_libdir}/libsgephem.so
%{_libdir}/libsgio.so
%{_libdir}/libsgmagvar.so
%{_libdir}/libsgmaterial.so
%{_libdir}/libsgmath.so
%{_libdir}/libsgmisc.so
%{_libdir}/libsgmodel.so
%{_libdir}/libsgnasal.so
%{_libdir}/libsgprops.so
%{_libdir}/libsgroute.so
%{_libdir}/libsgscreen.so
%{_libdir}/libsgserial.so
%{_libdir}/libsgsky.so
%{_libdir}/libsgsound.so
%{_libdir}/libsgstructure.so
%{_libdir}/libsgtgdb.so
%{_libdir}/libsgtsync.so
%{_libdir}/libsgthreads.so
%{_libdir}/libsgtiming.so
%{_libdir}/libsgutil.so
%{_libdir}/libsgxml.so

%changelog
* Tue May 29 2012 Tom Callaway <spot@fedoraproject.org> 2.4.0-4
- check to be sure that %n is not being set as format type (CVE-2012-2090)

* Fri Sep 09 2011 Fabrice Bellet <fabrice@bellet.info> 2.4.0-3
- Really rebuild against OSG-3.0.1

* Thu Sep 08 2011 Fabrice Bellet <fabrice@bellet.info> 2.4.0-2
- Rebuild against OSG-3.0.1

* Mon Sep 05 2011 Fabrice Bellet <fabrice@bellet.info> 2.4.0-1
- new upstream release

* Tue Jun 14 2011 Ralf Corsépius <corsepiu@fedoraproject.org> 2.0.0-6
- Rebuild against OSG-2.8.5.

* Wed Apr 20 2011 Tom Callaway <spot@fedoraproject.org> 2.0.0-5
- nuke old bundled copy of expat, use system expat (resolves 691934)

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Jul 02 2010 Ralf Corsépius <corsepiu@fedoraproject.org> 2.0.0-3
- Rebuild against OSG-2.8.3.

* Fri Jun 18 2010 Dan Horák <dan[at]danny.cz> 2.0.0-2
- include s390/s390x in the more-arches patch

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

* Sun Feb 14 2010 Fabrice Bellet <fabrice@bellet.info> 1.9.1-10
- Fix FTBFS (bz#564682)

* Sun Nov 29 2009 Fabrice Bellet <fabrice@bellet.info> 1.9.1-9
- Fix osgParticle dependency (bz#542132)

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

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

* Sun Jun 14 2009 Fabrice Bellet <fabrice@bellet.info> 1.9.1-6
- Fix header file installed twice

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

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

* Sun Feb 15 2009 Hans de Goede <hdegoede@redhat.com> 1.9.1-3
- Remove rpath on x86_64

* 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

* Wed Sep 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.0.0-5
- fix SimGear-0.3.10-notabbed_value_test.patch to apply without fuzz

* Tue May 13 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.0-4
- Rebuild for new plib

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.0-3
- Autorebuild for GCC 4.3

* Mon Jan  7 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.0-2
- Fix timestamp.hxx to not require the (not installed) simgear_config.h header

* Sun Jan  6 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.0-1
- Update to new upstream release 1.0.0
- Port various patches to 1.0.0

* Wed Oct 03 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.11-0.2.pre1.2
- enable alpha (bz 303161)

* Mon Aug 27 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.11-0.2.pre1.1
- rebuild for ppc32

* Fri Aug  3 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3.11-0.3.pre1
- Update License tag for new Licensing Guidelines compliance

* Wed Jun 27 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.11-0.2.pre1
- fix ppc defines in conditional to be more complete

* Wed Jun 27 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.11-0.1.pre1
- bump to 0.3.11-0.1.pre1
- fix BZ 245320

* Fri Mar 30 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3.10-4
- link with -release %%{version} libtool flag instead of -version, so that we
  get unique soname's for each upstream release. (Upstream gives 0 ABI
  guarantees)
- fix many undefined-non-weak-symbol's, some still remain though, see bz 208678
- work around the "thesky" bug, see bz 208678

* Wed Oct 18 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.10-3
- patch out the config internal header calls (not packaged)
- use generic libGL-devel Requires

* Tue Oct  3 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.10-2
- patch in some shared libraries

* Fri Sep 29 2006 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.10-1
- bump to 0.3.10, fix BuildRequires

* Wed Sep  7 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.8-1
- initial package for Fedora Extras