File libbullet.spec of Package libbullet

# spec file for package libbullet
# 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

%define sover   2_86
%define lname   libbullet%{sover}
%define pdesc   Bullet is a Collision Detection and Rigid Body Dynamics \
Name:           libbullet
Version:        2.86.1
Release:        0
Summary:        Bullet Continuous Collision Detection and Physics Library
License:        Zlib
Group:          Development/Libraries/C and C++
Patch1:         fix-pkgconfig-cflags.patch
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libxml-2.0)


%package -n %{lname}
Summary:        Bullet Continuous Collision Detection and Physics Library
Group:          System/Libraries
Obsoletes:      libbullet < %{version}-%{release}
Provides:       libbullet = %{version}-%{release}

%description -n %{lname}

%package -n libBulletFileLoader%{sover}
Summary:        Bullet File Loader Library
Group:          System/Libraries

%description -n libBulletFileLoader%{sover}

%package -n libBulletInverseDynamicsUtils%{sover}
Summary:        Bullet Inverse Dynamics Utils Library
Group:          System/Libraries

%description -n libBulletInverseDynamicsUtils%{sover}

%package -n libBulletWorldImporter%{sover}
Summary:        Bullet World Importer Library
Group:          System/Libraries

%description -n libBulletWorldImporter%{sover}

%package -n libBulletXmlWorldImporter%{sover}
Summary:        Bullet Xml World Importer Library
Group:          System/Libraries

%description -n libBulletXmlWorldImporter%{sover}

%package -n libConvexDecomposition%{sover}
Summary:        Bullet Convex Decomposition Library
Group:          System/Libraries

%description -n libConvexDecomposition%{sover}

%package -n libGIMPACTUtils%{sover}
Summary:        Bullet GIMPACT Utils Library
Group:          System/Libraries

%description -n libGIMPACTUtils%{sover}

%package -n libHACD%{sover}
Summary:        Bullet HACD Library
Group:          System/Libraries

%description -n libHACD%{sover}

%package devel
Summary:        Development package for bullet library
Group:          Development/Libraries/C and C++
Requires:       %{lname} = %{version}
Requires:       libBulletFileLoader%{sover} = %{version}
Requires:       libBulletInverseDynamicsUtils%{sover} = %{version}
Requires:       libBulletWorldImporter%{sover} = %{version}
Requires:       libBulletXmlWorldImporter%{sover} = %{version}
Requires:       libConvexDecomposition%{sover} = %{version}
Requires:       libGIMPACTUtils%{sover} = %{version}
Requires:       libHACD%{sover} = %{version}

%description devel
This package contain all that is needed to developer or compile
appliancation with the Bullet library.

%setup -q -n bullet3-%{version}
sed -i 's/\r//'
%patch1 -p1

tmpflags="%{optflags} -fno-strict-aliasing"
%ifarch %{ix86}
%if 0%{?suse_version} == 1320
tmpflags="${tmpflags} -fno-stack-protector"
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
       -DCMAKE_C_FLAGS="${tmpflags}" \
       -DCMAKE_CXX_FLAGS="${tmpflags}" \
       -DINCLUDE_INSTALL_DIR="%{_includedir}/bullet" \
       -DBUILD_UNIT_TESTS=off \

make VERBOSE=1 %{?_smp_mflags}

%fdupes %{buildroot}/%{_includedir}

%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%post -n libBulletFileLoader%{sover} -p /sbin/ldconfig
%postun -n libBulletFileLoader%{sover} -p /sbin/ldconfig
%post -n libBulletInverseDynamicsUtils%{sover} -p /sbin/ldconfig
%postun -n libBulletInverseDynamicsUtils%{sover} -p /sbin/ldconfig
%post -n libBulletWorldImporter%{sover} -p /sbin/ldconfig
%postun -n libBulletWorldImporter%{sover} -p /sbin/ldconfig
%post -n libBulletXmlWorldImporter%{sover} -p /sbin/ldconfig
%postun -n libBulletXmlWorldImporter%{sover} -p /sbin/ldconfig
%post -n libConvexDecomposition%{sover} -p /sbin/ldconfig
%postun -n libConvexDecomposition%{sover} -p /sbin/ldconfig
%post -n libGIMPACTUtils%{sover} -p /sbin/ldconfig
%postun -n libGIMPACTUtils%{sover} -p /sbin/ldconfig
%post -n libHACD%{sover} -p /sbin/ldconfig
%postun -n libHACD%{sover} -p /sbin/ldconfig

%files -n %{lname}
%doc LICENSE.txt AUTHORS.txt
%exclude %{_libdir}/*
%exclude %{_libdir}/*
%exclude %{_libdir}/*
%exclude %{_libdir}/*

%files -n libBulletFileLoader%{sover}

%files -n libBulletInverseDynamicsUtils%{sover}

%files -n libBulletWorldImporter%{sover}

%files -n libBulletXmlWorldImporter%{sover}

%files -n libConvexDecomposition%{sover}

%files -n libGIMPACTUtils%{sover}

%files -n libHACD%{sover}

%files devel

openSUSE Build Service is sponsored by