Blob Blame History Raw
Name:		SimGear
Version:	1.0.0
Release:	1%{?dist}
License:	GPLv2+
Group:		System Environment/Libraries
Summary:	Simulation library components
URL:		http://www.simgear.org
Source0:	ftp://ftp.simgear.org/pub/simgear/Source/SimGear-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0:		SimGear-1.0.0-shared.patch
Patch1:		SimGear-0.3.10-notabbed_value_test.patch
Patch2:		SimGear-0.3.10-headers.patch
Patch3:		SimGear-1.0.0-shared-auto.patch
Patch4:		SimGear-0.3.10-thesky.patch
Patch5:		SimGear-1.0.0-untangle.patch
Patch7:		SimGear-1.0.0-more-archs.patch
BuildRequires:	openal-devel, plib-devel, libXt-devel, libXext-devel
BuildRequires:	libXi-devel, libXmu-devel, freeglut-devel, freealut-devel
BuildRequires:	zlib-devel, libjpeg-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

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

%prep
%setup -q
# automake / autoconf input file changes
%patch0 -p1
# automake / autoconf auto generated changes
%patch3 -p1
# Have to disable the tabbed_value_test, because otherwise
# we get caught in a loop between libsgprops and libsgmisc.
%patch1 -p1
# The Sky issue, see bz 208678
%patch4 -p1
# Some circular dependcy fixing, see bz 208678
%patch5 -p1
# Fix compiling on pcc and alpha
%patch7 -p1
chmod -x simgear/screen/GLBitmaps.cxx simgear/scene/model/*.?xx

%build
%configure --with-jpeg-factory --disable-static
# We do not want -lm by default!
sed -i 's/ -lm / /g' libtool
# This application doesn't build with smp_mflags. :/
# The libs override are to avoid unnecessary linking with -lm
make base_LIBS= openal_LIBS="-lalut -lopenal" \
  opengl_LIBS="-lglut -lGLU -lGL -lXmu -lXt -lSM -lICE -lXi -lXext -lX11"

%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 < %{PATCH2}

%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}/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}/libsgthreads.so
%{_libdir}/libsgtiming.so
%{_libdir}/libsgxml.so

%changelog
* 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