File seqan3.spec of Package seqan3

#
# spec file for package seqan3
#
# Copyright (c) 2021 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:           seqan3
Version:        3.0.3
Release:        0
Summary:        The modern C++ library for sequence analysis
License:        BSD-3-Clause
Group:          Development/Languages/C and C++
URL:            https://www.seqan.de/
Source:         https://github.com/seqan/seqan3/releases/download/%{version}/seqan3-%{version}-Source.tar.xz
# PATCH-FIX-FEDORA
Patch0:         %{name}-unbundle_benchmark.patch
Patch1:         %{name}-cppreference.patch
Patch2:         %{name}-unbundle_gtest.patch
BuildRequires:  benchmark-devel
BuildRequires:  cereal-devel >= 1.2.3
BuildRequires:  cmake >= 3.4
BuildRequires:  dos2unix
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  pkgconfig
BuildRequires:  range-v3-devel >= 0.11.0
BuildRequires:  xz
BuildRequires:  pkgconfig(bzip2) >= 1.0
BuildRequires:  pkgconfig(gtest) >= 1.10.0
BuildRequires:  pkgconfig(lemon)
BuildRequires:  pkgconfig(zlib) >= 1.2
BuildArch:      noarch

%description
SeqAn3 is the new version of the popular SeqAn template
library for the analysis of biological sequences.
It enables the rapid development of high-performance
solutions by providing generic algorithms and
data structures for:

 - sequence representation and transformation
 - full-text indexing and efficient search
 - sequence alignment
 - input/output of common file formats

%package devel
Summary:        SeqAn3 header only files
Requires:       cereal-devel >= 1.2.3
Requires:       cmake >= 3.4
Requires:       range-v3-devel >= 0.11.0
Requires:       pkgconfig(bzip2) >= 1.0
Requires:       pkgconfig(zlib) >= 1.2
Provides:       bundled(sdsl-lite-devel) = 3.0.0
Provides:       bundled(sdsl-devel) = 3.0.0
Provides:       bundled(SDSL-devel) = 3.0.0

%description devel
C++ headers files of SeqAn3, including CMake configuration files.

%prep
%autosetup -n %{name}-%{version}-Source -N

dos2unix test/cmake/seqan3_require_benchmark.cmake
%patch0 -p1 -b .backup
%patch1 -p1 -b .backup
%patch2 -p1 -b .backup

# Unbundle libraries
rm -rf submodules/cereal
rm -rf submodules/range-v3
rm -rf submodules/sdsl-lite/cereal
rm -rf submodules/sdsl-lite/googletest

# SDSL 3.0 is a new SDSL pre-release, under development.
# See https://github.com/xxsds/sdsl-lite
cp -p submodules/sdsl-lite/LICENSE submodules/sdsl-lite/sdsl-LICENSE

# Fix file permissions
find . -type f -name "*.hpp" -exec chmod 0644 '{}' \;

%build
%cmake
%make_build

%install
%cmake_install

%files devel
%{_datadir}/doc/%{name}/
%{_includedir}/%{name}/
%{_datadir}/cmake/%{name}/

%changelog
openSUSE Build Service is sponsored by