%undefine __cmake_in_source_build Name: simbody Version: 3.7 Release: 1%{?dist} Summary: Multi-body Physics API #ExclusiveArch: %{ix86} x86_64 # Simbody is Apache 2.0 # The included CPodes integrator is BSD (SimTKmath/Integrators/src/CPodes/sundials/) # The forked tinyxml is zlib/png (SimTKcommon/src/tinyxml*) License: ASL 2.0 and BSD and zlib URL: https://simtk.org/home/simbody Source0: https://github.com/%{name}/%{name}/archive/Simbody-%{version}/%{name}-%{version}.tar.gz # Unbundle IpOpt and correct some const changes made in the bundled IpOpt. # Not submitted upstream Patch0: %{name}-3.7-ipopt.patch # Remove non-standard permissions when installing libraries and headers # Not submitted upstream Patch1: %{name}-3.7-permissions.patch BuildRequires: blas-devel BuildRequires: cmake BuildRequires: coin-or-Ipopt-devel BuildRequires: doxygen BuildRequires: freeglut-devel BuildRequires: gcc-c++ BuildRequires: graphviz BuildRequires: lapack-devel BuildRequires: libXext-devel BuildRequires: libXi-devel BuildRequires: libXmu-devel BuildRequires: mesa-libGL-devel BuildRequires: mesa-libGLU-devel Provides: bundled(tinyxml) Provides: bundled(sundials) %description This project is a SimTK tool set providing general multi-body dynamics capability, that is, the ability to solve Newton's 2nd law F=ma in any set of generalized coordinates subject to arbitrary constraints. Simbody is provided as an open source, object-oriented C++ API and delivers high-performance, accuracy-controlled science/engineering-quality results. Simbody uses an advanced Featherstone-style formulation of rigid body mechanics to provide results in Order(n) time for any set of n generalized coordinates. This can be used for internal coordinate modeling of molecules, or for coarse-grained models based on larger chunks. It is also useful for large-scale mechanical models, such as neuro-muscular models of human gait, robotics, avatars, and animation. Simbody can also be used in real time interactive applications for bio-simulation as well as for virtual worlds and games. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package doc Summary: Documentation for %{name} BuildArch: noarch %description doc The %{name}-doc package contains extensive API documentation for developing applications that use %{name}. %prep %setup -qn %{name}-Simbody-%{version} %patch0 -p0 -b .ipopt %patch1 -p0 -b .permissions # Get rid of windows dlls rm -fr Platform/Windows rm -fr Simbody/Visualizer/simbody-visualizer/glut32 # Get rid of spurious executable permissions find ./ -name '*.cpp' -exec chmod -x {} ';' find ./ -name '*.h' -exec chmod -x {} ';' # Get rid of -O3 flags sed -i 's/-O3 //' CMakeLists.txt # Don't use sse cflags if not x86_64 %ifnarch x86_64 sed -i 's/-m${GCC_INST_SET}//g' CMakeLists.txt %endif %build %cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DSimTK_INSTALL_PREFIX=/usr \ -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed" \ %if "%{_lib}" == "lib64" -DLIB64="64" \ %endif %ifarch x86_64 -DBUILD_INST_SET:STRING="sse2" %else -DBUILD_INST_SET:STRING="" %endif %cmake_build %cmake_build --target doxygen %install %cmake_install # Get rid of the sample CMakeLists.txt being installed rm -f %{buildroot}%{_datadir}/cmake/SampleCMakeLists.txt # Get rid of documentation in non-standard location rm -rf %{buildroot}/usr/share/doc # Move examples to /usr/share rm -rf %{buildroot}/usr/examples %check # Test cases are for informational purposes only %ctest --verbose || exit 0 %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license LICENSE.txt %doc README.md %{_libdir}/*.so.* %{_libdir}/%{name} %{_libexecdir}/%{name} %files devel %{_libdir}/*.so %{_libdir}/cmake %{_libdir}/pkgconfig/*.pc %{_includedir}/simbody %files doc %license LICENSE.txt %doc Simbody/doc/*.pdf %doc SimTKcommon/doc/*.pdf %doc SimTKmath/doc/*.pdf %changelog * Thu Aug 20 2020 Rich Mattes - 3.7-1 - Update to release 3.7 * Sat Feb 25 2017 Rich Mattes - 3.5.4-1 - Update to release 3.5.4 * Tue Jan 12 2016 Rich Mattes - 3.5.3-1 - Update to release 3.5.3 * Wed Mar 04 2015 Rich Mattes - 3.5.1-1 - Update to release 3.5.1 * Wed Feb 12 2014 Rich Mattes - 3.3.1-1 - Update to release 3.3.1 * Sat Oct 19 2013 Rich Mattes - 3.3-1 - Initial package