File OpenMOIV.spec of Package openmoiv

#
# spec file for package OpenMOIV
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           OpenMOIV
Version:        1.0.3a
Release:        0
Summary:        OpenMOIV is an object-oriented 3D multi-platform toolkit
License:        LGPL-2.1-or-later
URL:            https://www.coin3d.org
Source:         %{name}.src.%{version}.tar.bz2
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  Coin-devel

%description
OpenMOIV is an object-oriented 3D multi-platform toolkit that facilitates the rendering and
interaction of chemical systems.

%package -n libChemKit2
License:        LGPL-2.1-or-later
Group:          System/Libraries
Summary:        Shared library for OpenMOIV

%description -n libChemKit2
OpenMOIV is an object-oriented 3D multi-platform toolkit that facilitates the rendering and
interaction of chemical systems.

%package devel
License:        LGPL-2.1-or-later
Group:          Development/Tools/Other
Summary:        Development Headers for OpenMOIV
Requires:       libChemKit2 = %{version}

%description devel
OpenMOIV is an object-oriented 3D multi-platform toolkit that facilitates the rendering and
interaction of chemical systems.

This package contains the development headers.

%prep
%autosetup -n %{name}.src.1.0.3

%build
export OVI_DIR=%_prefix
%{cmake} \
  -Dshared:BOOL=1 \
  -Dcoin:BOOLint=1 \
  -Dsys_fonts:BOOLint=0 \
  -Dno_libFL:BOOLint=1 \
  %{nil}

%{cmake_build}

%install
install -m 0644 include/*.h -D -t %{buildroot}%{_includedir}
install -m 0644 include/*.inc -D -t %{buildroot}%{_includedir}
install -m 0644 include/ChemKit2/*.h -D -t %{buildroot}%{_includedir}/ChemKit2 
install -m 0644 include/ChemKit2/util/*.h -D -t %{buildroot}%{_includedir}/ChemKit2/util
install -m 0755 %{__builddir}/libChemKit2.so -D -t %{buildroot}%{_libdir}

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

%files -n libChemKit2
%license LICENSE.LGPL OPENMOIV.LICENSE
%{_libdir}/*.so

%files devel
%{_includedir}/*.h
%{_includedir}/*.inc
%{_includedir}/ChemKit2

%changelog

openSUSE Build Service is sponsored by