File ncbi-blast.spec of Package ncbi-blast+
#
# spec file for package ncbi-blast
#
# Copyright (c) 2022 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: ncbi-blast+
Version: 2.13.0
Release: 0
Summary: NCBI BLAST finds regions of similarity between biological sequences
License: SUSE-Public-Domain
Group: Productivity/Scientific/Other
URL: https://www.ncbi.nlm.nih.gov/books/NBK131777
Source: ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/%{version}/ncbi-blast-%{version}+-src.tar.gz
# PATCH-FIX-UPSTREAM ncbi-blast-no-return-from-non-void.patch badshah400@gmail.com -- Fix non-void functions not returning any value; fixes build for openSUSE >= 1550
Patch0: ncbi-blast-no-return-from-non-void.patch
BuildRequires: Xalan-c-devel
BuildRequires: cereal-devel
BuildRequires: fdupes
BuildRequires: file-devel
BuildRequires: freetds-devel
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: giflib-devel
BuildRequires: gmp-devel
BuildRequires: googlemock-devel
BuildRequires: hdf5-devel
BuildRequires: leveldb-devel
BuildRequires: libboost_chrono-devel
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_iostreams-devel
BuildRequires: libboost_program_options-devel
BuildRequires: libboost_regex-devel
BuildRequires: libboost_serialization-devel
BuildRequires: libboost_system-devel
BuildRequires: libboost_test-devel
BuildRequires: libboost_thread-devel
BuildRequires: libbz2-devel >= 1.0.5
BuildRequires: libgcrypt-devel
BuildRequires: libicu-devel
BuildRequires: libmimetic-devel
BuildRequires: libnsl-devel
BuildRequires: libxslt-tools
BuildRequires: lmdb-devel
BuildRequires: mbedtls-devel
BuildRequires: mysql-devel
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(ftgl)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(hiredis)
BuildRequires: pkgconfig(krb5)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libdw)
BuildRequires: pkgconfig(libexslt)
BuildRequires: pkgconfig(libgsasl)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libnghttp2)
BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(libpng12)
BuildRequires: pkgconfig(libssh2)
BuildRequires: pkgconfig(libssl)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libuv)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libxslt)
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(lzo2)
BuildRequires: pkgconfig(muparser)
BuildRequires: pkgconfig(protobuf)
BuildRequires: pkgconfig(rdkafka)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(xerces-c)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xt)
BuildRequires: python3-devel
BuildRequires: sablot-devel
BuildRequires: wxWidgets-devel >= 3.1
BuildRequires: zlib-devel
# The following are not found/enabled even when installed
#BuildRequires: FastCGI-devel
#BuildRequires: backward-cpp-devel
#BuildRequires: lapacke-devel
#BuildRequires: influxdb-devel
#BuildRequires: ncbi-devel
Requires: perl
Requires: perl(Archive::Tar)
Requires: perl(Digest::MD5)
Requires: perl(File::Temp)
Requires: perl(File::stat)
Requires: perl(Getopt::Long)
Requires: perl(List::MoreUtils)
Requires: perl(Net::FTP)
Requires: perl(Pod::Usage)
Requires: perl(constant)
Requires: perl(strict)
Requires: perl(warnings)
Requires(post): update-alternatives
Requires(postun): update-alternatives
# Narrowing on 32bit archs
ExcludeArch: %{ix86} %{arm} %{ppc}
%description
The NCBI Basic Local Alignment Search Tool (BLAST) finds regions of
local similarity between sequences. The program compares nucleotide or
protein sequences to sequence databases and calculates the statistical
significance of matches. BLAST can be used to infer functional and
evolutionary relationships between sequences as well as help identify
members of gene families.
%package devel
Summary: NCBI BLAST finds regions of similarity between biological sequences
Group: Development/Libraries/C and C++
%description devel
The NCBI Basic Local Alignment Search Tool (BLAST) finds regions of
local similarity between sequences. The program compares nucleotide or
protein sequences to sequence databases and calculates the statistical
significance of matches. BLAST can be used to infer functional and
evolutionary relationships between sequences as well as help identify
members of gene families.
%prep
%autosetup -p1 -n ncbi-blast-%{version}+-src/c++
%build
export CXXFLAGS="%{optflags} -fpermissive"
./configure \
--prefix=%{_prefix} \
--without-static \
--with-dll \
--without-sse42 \
--with-3psw \
--with-mbedtls \
%{nil}
%make_build
%install
make prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir} install
mv %{buildroot}%{_bindir}/rpsblast %{buildroot}%{_bindir}/rpsblast-blast+
rm %{buildroot}%{_libdir}/*.a
find %{buildroot} \( -iname .gitignore -o -iname .cvsignore\* \) -print -delete
find %{buildroot}%{_includedir} -type f -perm /333 -exec chmod -wx '{}' \+
find %{buildroot}%{_libdir} -type f -iname \*.so -exec chmod +x '{}' \+
sed -i -e '1 s@env python3@python3@' -e '1 s@env perl@perl@' %{buildroot}%{_bindir}/*
# create a dummy target for /etc/alternatives/rpsblast
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
ln -s -f %{_sysconfdir}/alternatives/rpsblast %{buildroot}%{_bindir}/rpsblast
%fdupes %{buildroot}/%{_includedir}
%fdupes %{buildroot}/%{_libdir}
%post
update-alternatives --install \
%{_bindir}/rpsblast rpsblast %{_bindir}/rpsblast-blast+ 20
%postun
if [ ! -f %{_bindir}/rpsblast-blast+ ] ; then
update-alternatives --remove rpsblast %{_bindir}/rpsblast-blast+
fi
%files
%{_bindir}/*
%ghost %{_sysconfdir}/alternatives/rpsblast
%files devel
%{_libdir}/*.so
%{_includedir}/ncbi-tools++
%changelog