ExclusiveArch: x86_64 %{arm64} %{power64} Name: libopentims Version: 1.2.3 Release: %autorelease -b 3 Summary: C++ library for accessing timsTOF Pro data format (TDF) License: MIT URL: https://github.com/michalsta/opentims Source0: %{url}/archive/refs/tags/v%{version}/opentims-%{version}.tar.gz # Fix SQlite3 requests Patch0: libopentims-fix_sqlite3.patch BuildRequires: cmake BuildRequires: libzstd-devel BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(gtest) BuildRequires: gcc BuildRequires: gcc-c++ %description OpenTIMS is a C++ library for accessing timsTOF Pro data format (TDF). It replaces (to a large extent) Bruker's SDK for purposes of data access and provides convenient layer for integration into higher level computer languages. With OpenTIMS you can access data contained in the `analysis.tdf_bin` file produced by your mass spectrometer of choice (as long as it is a timsTOF instrument). It also parses some of the information out of the `SQLite` data base contained in the `analysis.tdf` file. You should have both of these files in one folder to start using our software. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains libraries and header files for developing applications that use libopentims. %package -n python3-opentims BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros BuildRequires: python3-pandas BuildRequires: python3-pybind11 BuildRequires: python3-numpy BuildRequires: python3dist(pytest) Summary: Python bindings for libopentims Requires: %{name}%{?_isa} = %{version}-%{release} %py_provides python3-opentims %description -n python3-opentims Python bindings for libopentims. %prep %autosetup -n opentims-%{version} -p1 %generate_buildrequires %pyproject_buildrequires %build export LDFLAGS="%{__global_ldflags} -lsqlite3" %cmake -DCMAKE_BUILD_TYPE:STRING=Release \ -DOPENTIMS_BUILD_PYTHON:BOOL=OFF \ -DOPENTIMS_BUILD_TESTS:BOOL=ON \ -DPYTHON_INCLUDE_DIR:PATH=%{_includedir}/python%{python3_version} \ -DPYTHON_LIBRARY:PATH=%{python3_sitearch} \ -DOPENTIMS_LINK_SQLITE_STATICALLY:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES %cmake_build %pyproject_wheel %install %cmake_install rm -rf %{buildroot}%{_docdir} %pyproject_install %pyproject_save_files opentimspy %check export LD_LIBRARY_PATH=%{buildroot}%{_libdir} %ctest %pyproject_check_import %pytest %files %license LICENCE %doc README.md NOTICE %{_libdir}/libopentims_cpp.so.1.2.3 %{_libdir}/libopentims_cpp.so.1 %files devel %{_includedir}/opentims++/ %{_libdir}/libopentims_cpp.so %{_libdir}/cmake/opentims/ %{_libdir}/pkgconfig/opentims.pc %files -n python3-opentims -f %{pyproject_files} %doc README.md NOTICE %changelog %autochangelog