Blob Blame History Raw
Name:      seqan
Summary:   Open source C++ library of efficient algorithms and data structures
Version:   1.4.2
Release:   33%{?dist}
License:   BSD and GPLv3+ and LGPLv3+
URL:       http://www.seqan.de/
Source0:   http://packages.seqan.de/seqan-src/seqan-src-%{version}.tar.gz

## This patch sets a seqan directory for documentation files
Patch0: %{name}-docpath.patch

## These patches exclude tests of splazers, fiona, bs_tools
## They fail beacause unknown reasons
Patch1: %{name}-exclude_splazers_fiona_tests.patch
Patch2: %{name}-exclude_bstools_test.patch

BuildRequires: qt4-devel >= 4.7
BuildRequires: cmake >= 2.8
BuildRequires: llvm-devel
BuildRequires: bzip2-devel
BuildRequires: zlib-devel
BuildRequires: boost-devel
BuildRequires: coin-or-lemon-devel
BuildRequires: libstdc++-static
BuildRequires: java-1.8.0-openjdk-devel
## Test
BuildRequires: python2-devel
BuildRequires: python-nose
BuildRequires: pytest
BuildRequires: python-jinja2

Requires: gawk

## Bundled files exception https://fedorahosted.org/fpc/ticket/174
Provides: bundled(gnulib)

%description
SeqAn is an open source C++ library of efficient algorithms and data structures 
for the analysis of sequences with the focus on biological data. 
Our library applies a unique generic design that guarantees high performance, 
generality, extensibility, and integration with other libraries. 

%package devel
Summary: SeqAn development files

%description devel
Developer files for SeqAn, in the form for C header files.

%package doc
Summary: SeqAn documentation
BuildArch: noarch

%description doc
Info files of SeqAn's apps.

%prep
%setup -q -n seqan-%{version}
%patch0 -p0
%patch1 -p0

%ifarch %{arm} aarch64 %{power64} s390x
%patch2 -p0
%endif

## Remove spurious executable permissions
for i in `find . -perm /111 -type f \( -name "*.h" -o -name "*.cpp" \)`; do
chmod a-x $i
done

## Renamed each single license file 
cp -p extras/apps/rep_sep/LICENSE LGPLv3+.txt
cp -p core/apps/rabema/LICENSE GPLv3+.txt
cp -p LICENSE BSD.txt 

## Make install needs this README file
cp -p extras/apps/seqan_flexbar/INFO extras/apps/seqan_flexbar/README

%build
mkdir -p build/Release && pushd build/Release
##This error comes out on >=F22
##cc1plus: out of memory
%ifarch %{arm} || ( 0%{?fedora} >= 22 )
SEQAN_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-O2/-O0/g')
SEQAN_OPT_FLAGS="$SEQAN_OPT_FLAGS -fPIC -Wl,-z,now"
%else
SEQAN_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC -Wl,-z,now"
%endif
export CXXFLAGS="$SEQAN_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS -fPIC -Wl,-z,now"
cmake \
 -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SEQAN_OPT_FLAGS" \
 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
 -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
 -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \
 -DBUILD_SHARED_LIBS:BOOL=OFF \
 -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \
 -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
 -DCMAKE_BUILD_TYPE:STRING=Release -DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_APPS \
 -DSEQAN_HAS_BZIP2=1 -DSEQAN_HAS_ZLIB=1 -DSEQAN_APP_VERSION:STRING=%{version} \
 -DZLIB_INCLUDE_DIR:PATH=%{_includedir} -DZLIB_LIBRARY:FILEPATH="-L%{_libdir} -lz" \
 -DBZIP2_INCLUDE_DIR:PATH=%{_includedir} -DBZIP2_LIBRARY:FILEPATH="-L%{_libdir} -lbz2" \
 -DLEMON_INCLUDE_DIR:PATH=%{_includedir} -DLEMON_LIBRARY:FILEPATH="-L%{_libdir} -lemon" \
 -DBoost_INCLUDE_DIR:PATH=%{_includedir} -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \
 -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE ../..

##Compiler fails with parallel make
make all

%install
%make_install -C build/Release INSTALL="install -p"

## Put header files in ad-hoc include directory  
mkdir -p %{buildroot}%{_includedir}/seqan
cp -pr extras/include/seqan/* %{buildroot}%{_includedir}/seqan
cp -pr core/include/seqan/* %{buildroot}%{_includedir}/seqan

mkdir -p seqandoc
cp -pr %{buildroot}%{_docdir}/seqan/* seqandoc
rm -rf %{buildroot}%{_docdir}/seqan
rm -f seqandoc/*.txt

## Rename 'join' binary file; it conflicts with the one owned by 'coreutils' package
mv %{buildroot}%{_bindir}/join %{buildroot}%{_bindir}/searchjoin

## Fix executable permissions
for i in `find %{buildroot}%{_bindir} -perm /644 -type f \( -name "*.sh" \)`; do
chmod a+x $i
done

%check
pushd build/Release
# Skip 10 - app_test_samcat, 16 - app_test_bs_tools, 20 - app_test_ngs_roi
%ifarch %{arm} aarch64 %{power64} s390x
ctest -I 1,9 --force-new-ctest-process -VV -j1
%else
ctest --force-new-ctest-process -VV %{?_smp_mflags}
%endif

%files
%license BSD.txt GPLv3+.txt LGPLv3+.txt
%doc README.rst
%{_bindir}/*

%files doc
%license BSD.txt GPLv3+.txt LGPLv3+.txt
%doc seqandoc

%files devel
%license BSD.txt GPLv3+.txt LGPLv3+.txt
%doc README.rst
%{_includedir}/seqan/

%changelog
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Sun Jul 30 2017 Florian Weimer <fweimer@redhat.com> - 1.4.2-32
- Rebuild with binutils fix for ppc64le (#1475636)

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Tue Jul 04 2017 Jonathan Wakely <jwakely@redhat.com> - 1.4.2-30
- Rebuilt for Boost 1.64

* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 1.4.2-27
- Rebuilt for Boost 1.63

* Sat Nov 12 2016 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-26
- Skip tests on s390 and ppc

* Sat Nov 12 2016 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-25
- Skip failed tests

* Sat Feb 20 2016 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-24
- Fixed compiler/linker flags

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 1.4.2-22
- Rebuilt for Boost 1.60

* Wed Oct 21 2015 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-21
- Actived hardened build

* Tue Oct 13 2015 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-20
- Rebuilt for cmake 3.4.0
- Used %%license

* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 1.4.2-19
- Rebuilt for Boost 1.59

* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-18
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159

* Sat Jul 18 2015 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-17
- Parallel make always disabled

* Sat Jul 18 2015 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-16
- Rebuild for Boost upgrade to 1.58.0

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri May 15 2015 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-14
- Reduce optimization to -O0 (cc1plus error persists)

* Fri May 15 2015 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-13
- SPEC cleanups

* Fri May 15 2015 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-12
- Removed -pipe flag because of cc1plus error on ARMs

* Thu May 14 2015 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-11
- Set job=1 to Make on ARMs aarch64 ppc64 ppc64le

* Thu May 14 2015 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-10
- Downgrading to 1.4.2
- Excluded s390 s390x arches
- Excluded bstools_test on ARMs aarch64 ppc64 ppc64le

* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 1.4.2-9
- Rebuild for boost 1.57.0

* Tue Dec 02 2014 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-8
- Excluded bs_tools test on ARM

* Mon Dec 01 2014 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-7
- Parallel tests not performed on ARM

* Mon Dec 01 2014 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-6
- DBUILD_SHARED_LIBS boolean disabled
- Test enabled

* Tue Nov 25 2014 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-5
- Parallel make excluded on ARM arch

* Tue Nov 25 2014 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-4
- Tests disabled temporarily

* Sat Nov 22 2014 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-3
- Packaged private libraries
- Performed tests
- Splazers and fiona tests excluded

* Sat Nov 22 2014 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-2
- Parallel make excluded on ARM arch

* Fri Nov 21 2014 Antonio Trande <sagitterATfedoraproject.org> - 1.4.2-1
- Update to 1.4.2
- Fixed cmake compiler flags
- Fixed declaration of multiple license
- A doc sub-package is now built

* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 14 2014 Antonio Trande <sagitterATfedoraproject.org> 1.4.1-2
- Added 'Provides:bundled(gnulib)'
- Changed find command for executable permissions fixing
- Use %%make_install 
- Fixed wrong-file-end-of-line-encoding warnings
 
* Wed Jun 11 2014 Antonio Trande <sagitterATfedoraproject.org> 1.4.1-1
- First package