File SimGear.spec of Package SimGear

#
# spec file for package SimGear
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define libname libSimGearCore-2017_1_2
Name:           SimGear
Version:        2017.1.2
Release:        0
Summary:        Simulator Construction Gear
License:        LGPL-2.0+ and GPL-2.0+ and MIT
Group:          Amusements/Games/3D/Simulation
# https://sourceforge.net/p/flightgear/codetickets/1940/
Url:            http://www.flightgear.org/
Source0:        http://downloads.sourceforge.net/project/flightgear/release-2017.1/simgear-%{version}.tar.bz2
BuildRequires:  OpenSceneGraph-plugins >= 3.0
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  freealut-devel
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  libOpenSceneGraph-devel > 1.2
BuildRequires:  libOpenThreads-devel
BuildRequires:  libjpeg-devel
BuildRequires:  openal-soft-devel
BuildRequires:  pkgconfig
BuildRequires:  plib-devel
BuildRequires:  subversion-devel
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(apr-1)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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.

SimGear is developed as part of the FlightGear project and used by the
FlightGear flight simulator and many of its related utilities.

%package -n %libname
Summary:        Simulator Construction Gear
Group:          Amusements/Games/3D/Simulation
Requires:       OpenSceneGraph-plugins >= 3.0

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

SimGear is developed as part of the FlightGear project and used by the
FlightGear flight simulator and many of its related utilities.

%package devel
Summary:        Development libraries and headers for SimGear
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}
Requires:       boost-devel
Requires:       freealut-devel
Requires:       freeglut-devel
Requires:       libOpenSceneGraph-devel > 1.2
Requires:       libOpenThreads-devel
Requires:       libjpeg-devel
Requires:       openal-soft-devel
Requires:       plib-devel
Requires:       subversion-devel
Requires:       zlib-devel
Requires:       pkgconfig(apr-1)

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

%prep
%setup -q -n simgear-%{version}

%build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
# configure to build shared simgear libraries
%cmake \
	-DSIMGEAR_SHARED:BOOL=ON \
	-DENABLE_TESTS:BOOL=OFF \
	-DJPEG_FACTORY:BOOL=ON
make %{?_smp_mflags}

%install
%cmake_install
install -m 755 -d %{buildroot}%{_docdir}/%{name}
install -m 644 -t %{buildroot}%{_docdir}/%{name} AUTHORS ChangeLog NEWS README

%post -n %libname -p /sbin/ldconfig

%postun -n %libname -p /sbin/ldconfig

%files -n %libname
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/libSimGear*.so.*

%files devel
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}
%{_includedir}/simgear/
%{_libdir}/libSimGear*.so
%{_libdir}/cmake/SimGear/

%changelog
openSUSE Build Service is sponsored by