2020-04-18 09:07:13 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package libmsym
|
|
|
|
|
#
|
2024-02-27 22:33:10 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2020-04-18 09:07:13 +00:00
|
|
|
#
|
|
|
|
|
# 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/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2021-05-28 20:43:19 +00:00
|
|
|
# At least python3 is required
|
|
|
|
|
%define skip_python2 1
|
|
|
|
|
%if 0%{suse_version} >= 1550
|
|
|
|
|
# On Factory numpy does not support python36 anymore
|
|
|
|
|
%define skip_python36 1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%define sonum 0_2
|
2020-04-18 09:07:13 +00:00
|
|
|
Name: libmsym
|
|
|
|
|
Version: 0.2.3
|
|
|
|
|
Release: 0
|
|
|
|
|
Summary: Molecular point group symmetry library
|
|
|
|
|
License: MIT
|
|
|
|
|
Group: System/Libraries
|
|
|
|
|
URL: https://github.com/mcodev31/libmsym
|
2021-05-28 20:43:19 +00:00
|
|
|
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2021-11-03 07:24:40 +00:00
|
|
|
BuildRequires: %{python_module numpy}
|
2024-02-27 22:33:10 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2020-04-18 09:07:13 +00:00
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: gcc-c++
|
2021-05-28 20:43:19 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
|
|
|
|
|
%define python_subpackage_only 1
|
|
|
|
|
%python_subpackages
|
2020-04-18 09:07:13 +00:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
A C library dealing with point group symmetry in molecules.
|
|
|
|
|
|
2021-05-28 20:43:19 +00:00
|
|
|
%package -n %{name}%{sonum}
|
2020-04-18 09:07:13 +00:00
|
|
|
Summary: Molecular point group symmetry library
|
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
2021-05-28 20:43:19 +00:00
|
|
|
%description -n %{name}%{sonum}
|
2020-04-18 09:07:13 +00:00
|
|
|
A C library dealing with point group symmetry in molecules.
|
|
|
|
|
|
2021-05-28 20:43:19 +00:00
|
|
|
%package devel
|
|
|
|
|
Summary: Development files for libmsym
|
2020-04-18 09:07:13 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2021-05-28 20:43:19 +00:00
|
|
|
Requires: %{name}%{sonum} = %{version}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
This package contains all necessary include files and libraries
|
|
|
|
|
needed to develop applications that require libmsym.
|
2020-04-18 09:07:13 +00:00
|
|
|
|
2021-05-28 20:43:19 +00:00
|
|
|
%package -n python-%{name}
|
|
|
|
|
Summary: Python bindings for libmsym
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description -n python-%{name}
|
|
|
|
|
This package contains the python bindings needed to develop
|
|
|
|
|
python applications that require libmsym.
|
2020-04-18 09:07:13 +00:00
|
|
|
|
|
|
|
|
%prep
|
2021-05-28 20:43:19 +00:00
|
|
|
%setup -q
|
2020-04-18 09:07:13 +00:00
|
|
|
|
|
|
|
|
%build
|
2021-05-28 20:43:19 +00:00
|
|
|
%cmake \
|
|
|
|
|
-DINSTALL_LIB_DIR=%{_libdir} \
|
|
|
|
|
-DINSTALL_CMAKE_DIR=%{_libdir}/cmake/libmsym
|
|
|
|
|
%make_build
|
|
|
|
|
pushd ../bindings/python
|
|
|
|
|
%python_build
|
|
|
|
|
popd
|
2020-04-18 09:07:13 +00:00
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%cmake_install
|
2021-05-28 20:43:19 +00:00
|
|
|
pushd bindings/python
|
|
|
|
|
%python_install
|
|
|
|
|
popd
|
2020-04-18 09:07:13 +00:00
|
|
|
|
2021-05-28 20:43:19 +00:00
|
|
|
%post -n %{name}%{sonum} -p /sbin/ldconfig
|
|
|
|
|
%postun -n %{name}%{sonum} -p /sbin/ldconfig
|
2020-04-18 09:07:13 +00:00
|
|
|
|
2021-05-28 20:43:19 +00:00
|
|
|
%files -n %{name}%{sonum}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{_libdir}/libmsym.so.*
|
|
|
|
|
|
|
|
|
|
%files devel
|
2020-04-18 09:07:13 +00:00
|
|
|
%doc README.md
|
2021-05-28 20:43:19 +00:00
|
|
|
%{_libdir}/cmake/libmsym/
|
|
|
|
|
%{_includedir}/libmsym/
|
|
|
|
|
%{_libdir}/libmsym.so
|
|
|
|
|
|
2022-09-15 03:15:38 +00:00
|
|
|
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150400
|
2021-05-28 20:43:19 +00:00
|
|
|
%files %{python_files %name}
|
|
|
|
|
%{python_sitelib}/*
|
2021-11-03 07:28:20 +00:00
|
|
|
%else
|
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
%endif
|
2020-04-18 09:07:13 +00:00
|
|
|
|
|
|
|
|
%changelog
|