bwa/bwa.spec
沈仲伟 514cd5cfbd include all patches in the source package.
(cherry picked from commit b0f5a3b555c5270d0f8e9496d9fef276f0d84d8f)
2024-12-09 14:14:06 +08:00

77 lines
2.1 KiB
RPMSpec

Name: bwa
Version: 0.7.18
Release: 3
Summary: Burrows-Wheeler Alignment tool
License: GPLv3 and MIT
URL: https://github.com/lh3/bwa
Source0: https://github.com/lh3/bwa/releases/download/v%{version}/%{name}-%{version}.tar.gz
Patch1: bwa-simde.patch
BuildRequires: gcc perl-generators
%ifnarch x86_64
BuildRequires: simde-devel
%endif
BuildRequires: zlib-devel
%description
BWA is a program for aligning sequencing reads against a large
reference genome (e.g. human genome). It has two major components, one
for read shorter than 150bp and the other for longer reads.
%prep
%setup
%ifnarch riscv64
%patch -P1 -p1
%endif
%build
CFLAGS="%{optflags} -O3"
%ifnarch x86_64
CFLAGS="${CFLAGS} -DUSE_SIMDE -DSIMDE_ENABLE_NATIVE_ALIASES -fopenmp-simd -DSIMDE_ENABLE_OPENMP"
%else
CFLAGS="${CFLAGS} -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES -fopenmp-simd -DSIMDE_ENABLE_OPENMP"
%endif
%if "%{?toolchain}" == "clang"
%make_build CC=clang CFLAGS="${CFLAGS}"
%else
%make_build CFLAGS="${CFLAGS}"
%endif
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_datadir}/%{name}/bwakit
mkdir -p %{buildroot}/%{_mandir}/man1
install -m 0755 bwa %{buildroot}/%{_bindir}
install -m 0755 qualfa2fq.pl %{buildroot}/%{_bindir}
install -m 0755 xa2multi.pl %{buildroot}/%{_bindir}
install -m 0755 bwakit/* %{buildroot}/%{_datadir}/%{name}/bwakit
install -m 0644 bwa.1 %{buildroot}/%{_mandir}/man1/bwa.1
%check
./bwa 2>&1 | grep '^Version: %{version}'
%files
%doc COPYING NEWS.md README.md README-alt.md
%{_bindir}/bwa
%{_bindir}/qualfa2fq.pl
%{_bindir}/xa2multi.pl
%{_datadir}/%{name}/*
%{_mandir}/man1/%{name}.1*
%changelog
* Mon Dec 09 2024 shenzhongwei <shenzhongwei@kylinos.cn> - 0.7.18-3
- include all patches in the source package.
* Wed Aug 28 2024 wangqiang <wangqiang1@kylinos.cn> - 0.7.18-2
- Support build with clang
* Mon Jul 8 2024 Ge Wang <wang__ge@126.com> - 0.7.18-1
- Update to version 0.7.18
* Fri Jan 8 2021 chengzihan <chengzihan2@huawei.com> - 0.7.17-1
- Package init