Skip to content

Commit

Permalink
Fix for review 3. (#2)
Browse files Browse the repository at this point in the history
* Change the source to GitHub's one.
* Fix typo.
* Add man files.
* Build with %optflags.
* Convert 2 lines blank to 1 line blank too.
  • Loading branch information
junaruga committed May 3, 2020
1 parent ab13e3b commit a09cc9a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 14 deletions.
Binary file modified bowtie2-2.4.1-1.fc33.src.rpm
Binary file not shown.
31 changes: 31 additions & 0 deletions bowtie2-makefile-cxxflags.patch
@@ -0,0 +1,31 @@
diff --git a/Makefile b/Makefile
index 9b6a46e..df5a817 100644
--- a/Makefile
+++ b/Makefile
@@ -207,18 +207,18 @@ else ifeq (amd64,$(shell uname -m))
else ifeq (aarch64,$(shell uname -m))
BITS := 64
SSE_FLAG :=
- CXXFLAGS := -fopenmp-simd
- CPPFLAGS := -Ithird_party/simde
+ CXXFLAGS += -fopenmp-simd
+ CPPFLAGS += -Ithird_party/simde
else ifeq (s390x,$(shell uname -m))
BITS := 64
SSE_FLAG :=
- CXXFLAGS := -fopenmp-simd
- CPPFLAGS := -Ithird_party/simde
+ CXXFLAGS += -fopenmp-simd
+ CPPFLAGS += -Ithird_party/simde
SANITIZER_FLAGS :=
else ifeq (ppc64le,$(shell uname -m))
BITS := 64
SSE_FLAG :=
- CXXFLAGS := -fopenmp-simd
+ CXXFLAGS += -fopenmp-simd
CPPFLAGS += -Ithird_party/simde
SANITIZER_FLAGS :=
endif
--
2.25.4

37 changes: 23 additions & 14 deletions bowtie2.spec
@@ -1,20 +1,22 @@
Name: bowtie2
Version: 2.4.1
Release: 1%{?dist}
Summary: An ultrafast and memory-efficient read aligner
# Use the word "ultra fast" rather than "ultrafast".
# https://github.com/BenLangmead/bowtie2/issues/291
Summary: An ultra fast and memory-efficient read aligner
# * bowtie2: GPLv3+
# * TinyThread++: zlib, for files: tinythread.{h,cpp} fast_mutex.h
# https://tinythreadpp.bitsnbites.eu/
# https://gitorious.org/tinythread/tinythreadpp
License: GPLv3+ and zlib
URL: http://bowtie-bio.sourceforge.net/bowtie2/index.shtml
Source0: https://downloads.sourceforge.net/project/bowtie-bio/%{name}/%{version}/%{name}-%{version}-source.zip
# git clone https://github.com/BenLangmead/bowtie2.git
# cd bowtie2 && git checkout v2.4.1
# tar czvf bowtie2-2.4.1-tests.tgz scripts/test/
Source1: bowtie2-2.4.1-tests.tgz
Source0: https://github.com/BenLangmead/%{name}/archive/v%{version}.tar.gz
# Fix to build with given CXXFLAGS.
# https://github.com/BenLangmead/bowtie2/pull/296
Patch0: bowtie2-makefile-cxxflags.patch
Requires: python3
BuildRequires: gcc-c++
BuildRequires: help2man
BuildRequires: libasan
BuildRequires: libubsan
BuildRequires: perl-generators
Expand All @@ -41,10 +43,9 @@ ExcludeArch: %{ix86} %{arm} s390x
# TinyThread++
Provides: bundled(tiny-thread) = 1.1


%description

Bowtie 2 is an ultrafast and memory-efficient tool for aligning sequencing
Bowtie 2 is an ultra fast and memory-efficient tool for aligning sequencing
reads to long reference sequences. It is particularly good at aligning reads
of about 50 up to 100s or 1,000s of characters, and particularly good at
aligning to relatively long (e.g. mammalian) genomes. Bowtie 2 indexes the
Expand All @@ -68,8 +69,10 @@ for file in bowtie2-{build,inspect}; do
sed -i '1s|/usr/bin/env python3|%{__python3}|' "${file}"
done


%build
# Set build flags.
# https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md
%set_build_flags
# Set flags considering the upstream testing cases for each architecture.
# https://github.com/BenLangmead/bowtie2/blob/master/.travis.yml
%ifnarch x86_64
Expand All @@ -82,18 +85,23 @@ export NO_TBB=1
# saving the build time.
%make_build all


%install
%make_install PREFIX="%{_prefix}"

mkdir -p %{buildroot}%{_mandir}/man1
# Set version string explicitly to avoid showing the wrong command.
# https://github.com/BenLangmead/bowtie2/issues/294
for cmd in bowtie2 bowtie2-{build,inspect}; do
help2man -N -s 1 -o "%{buildroot}%{_mandir}/man1/${cmd}.1" \
--version-string="%{version}" \
"%{buildroot}%{_bindir}/${cmd}"
done

%check
for cmd in bowtie2 bowtie2-{build,inspect}; do
./"${cmd}" --version | grep 'version %{version}'
done

tar xzvf %{SOURCE1}

# Skip tests for the debug and sanitized binaries not shipped.
sed -i '/my $binary_type/ s/"release", "debug", "sanitized"/"release"/' \
scripts/test/simple_tests.pl
Expand All @@ -106,7 +114,6 @@ scripts/test/simple_tests.pl \
--bowtie2-build=./bowtie2-build \
--compressed


%files
%doc AUTHORS MANUAL MANUAL.markdown NEWS TUTORIAL
%license LICENSE
Expand All @@ -119,7 +126,9 @@ scripts/test/simple_tests.pl \
%{_bindir}/bowtie2-inspect
%{_bindir}/bowtie2-inspect-l
%{_bindir}/bowtie2-inspect-s

%{_mandir}/man1/bowtie2.1*
%{_mandir}/man1/bowtie2-build.1*
%{_mandir}/man1/bowtie2-inspect.1*

%changelog
* Sat Mar 28 2020 Jun Aruga <jaruga@redhat.com> - 2.4.1-1
Expand Down

0 comments on commit a09cc9a

Please sign in to comment.