seqan/seqan.spec
2014-12-02 17:41:59 +01:00

178 lines
5.3 KiB
RPMSpec

Name: seqan
Summary: Open source C++ library of efficient algorithms and data structures
Version: 1.4.2
Release: 8%{?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, bzip2-devel, zlib-devel, boost-devel
BuildRequires: coin-or-lemon-devel, openmpi-devel, libstdc++-static
## Test
BuildRequires: python2-devel, python-nose, pytest, python-jinja2
%if 0%{?fedora} < 21
BuildRequires: java-1.7.0-openjdk-devel
%else
BuildRequires: java-1.8.0-openjdk-devel
%endif
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
Requires: %{name}
%description doc
Info files of SeqAn's apps.
%prep
%setup -q -n seqan-%{version}
%patch0 -p0
%patch1 -p0
%ifarch %{arm}
%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
cmake \
-DCMAKE_C_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
-DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-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} \
-DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
../..
%ifarch %{arm}
make all
%else
make %{?_smp_mflags} all
%endif
%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
## 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
%ifarch %{arm}
ctest --force-new-ctest-process
%else
ctest --force-new-ctest-process %{?_smp_mflags}
%endif
%files
%doc BSD.txt GPLv3+.txt LGPLv3+.txt README.rst
%{_bindir}/*
%files doc
%doc %{_docdir}/seqan
%files devel
%doc BSD.txt GPLv3+.txt LGPLv3+.txt README.rst
%{_includedir}/seqan/
%changelog
* 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