A new user interface for you! Read more...

File fmilibrary.spec of Package fmil

#
# spec file for package fmilibrary
#
# Copyright (c) 2019 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/
#

Name:		   fmilibrary
Version:	   2.0.3
Release:	   0
Summary:	   FMI library
License:	   BSD-1-Clause
Group:         Productivity/Scientific/Math
Url:		   https://jmodelica.org
Source0:	   %{name}-%{version}.tar.gz
Patch0:        fix-implicit-fortify-decl.patch
Patch1:        fix-no-return-in-nonvoid-function.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: fdupes

%description
FMI Library (FMIL) is a software package written in C that enables integration
of Functional Mock-up Units (FMUs) import in applications. FMI Library is an
independent open-source implementation of the FMI open standard
(www.fmi-standard.org).
More information can be found at the FMI Library website www.fmi-library.org.

The FMI Library code is hosted at https://svn.jmodelica.org/FMILibrary/.
There is a git mirror at https://github.com/modelon/FMILibrary.   
Active issues are tracked at http://trac.jmodelica.org/wiki/FMILibrary.   
Discussion forums for FMI Library can be found at http://jmodelica.org/forum.
Please report issues related to FMI Library at the forums.

%package -n libfmilib_shared-devel
Summary:        FMI library (developer files)
Group:          Development/Libraries/C and C++
Requires:       libfmilib_shared = %{version}

%description -n libfmilib_shared-devel
FMI Library (FMIL) is a software package written in C that enables integration
of Functional Mock-up Units (FMUs) import in applications. FMI Library is an
independent open-source implementation of the FMI open standard
(www.fmi-standard.org).

This package contains the developer files (.so file, header files)

%package -n libfmilib_shared
Summary: FMI library - main shared libraries
Group: Productivity/Scientific/Math

%description -n libfmilib_shared
FMI Library (FMIL) is a software package written in C that enables integration
of Functional Mock-up Units (FMUs) import in applications. FMI Library is an
independent open-source implementation of the FMI open standard
(www.fmi-standard.org).

This package provides the main shared libraries for FMIL.

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
%cmake -DFMILIB_BUILD_STATIC_LIB=OFF

%make_jobs

%install
%cmake_install

%ifarch x86_64
mkdir -p %{buildroot}%{_libdir}
mv %{buildroot}/usr/lib/* %{buildroot}%{_libdir}
rm -rf %{buildroot}/usr/lib/
%endif

mkdir -p %{buildroot}%{_docdir}
mv %{buildroot}/usr/doc/* %{buildroot}%{_docdir}

%fdupes %{buildroot}

%post -n libfmilib_shared -p /sbin/ldconfig
%postun -n libfmilib_shared -p /sbin/ldconfig

%files -n libfmilib_shared-devel
%license %{_docdir}/FMILIB_License.txt
%doc %{_docdir}/FMILIB_Acknowledgements.txt 
%doc %{_docdir}/FMILIB_Readme.txt
%{_includedir}/fmilib_config.h
%{_includedir}/fmilib.h
%{_includedir}/FMI
%{_includedir}/FMI1
%{_includedir}/FMI2
%{_includedir}/JM

%files -n libfmilib_shared
%{_libdir}/libfmilib_shared.so

%changelog