751c2d3
Name: bcftools
751c2d3
Version: 1.9
a6c2358
Release: 2%{?dist}
751c2d3
Summary: Tools for genomic variant calling and manipulating VCF/BCF files
751c2d3
751c2d3
# This software is available under a choice of one of two licenses,
751c2d3
# the MIT/Expat (MIT) or the GNU General Public License Version 3 (GPLv3+).
751c2d3
# And if compiled with the GNU Scientific Library, in this case it is built
751c2d3
# with --enable-libgsl, the use of this software is governed by the GPLv3+
751c2d3
# license.
751c2d3
# See <https://github.com/samtools/bcftools/blob/develop/LICENSE>.
751c2d3
License: GPLv3+
751c2d3
# https:// is better than http://.
751c2d3
URL: https://www.htslib.org/
751c2d3
Source0: https://github.com/samtools/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2
751c2d3
Patch0: bcftools-1.9-python3.patch
751c2d3
Patch1: bcftools-1.9-configure.patch
751c2d3
751c2d3
BuildRequires: gcc
751c2d3
BuildRequires: gsl-devel
751c2d3
BuildRequires: htslib-devel
751c2d3
BuildRequires: htslib-tools
751c2d3
BuildRequires: perl-interpreter
751c2d3
BuildRequires: perl(ExtUtils::Embed)
751c2d3
BuildRequires: perl(File::Temp)
751c2d3
BuildRequires: perl(Getopt::Long)
751c2d3
BuildRequires: zlib-devel
751c2d3
# bcftools had been included in samtools version 0.X.
751c2d3
# https://github.com/samtools/samtools/commit/e7ae7f96c7e78a2dd6eabdaed57037c483951929
751c2d3
Conflicts: samtools < 1.0
751c2d3
# A big-endian (s390x) environment is not supported.
751c2d3
# https://github.com/samtools/htslib/issues/355
751c2d3
ExcludeArch: s390x
07332ca
07332ca
%description
07332ca
BCFtools is a set of utilities that manipulate genomic variant calls in the
07332ca
Variant Call Format (VCF) and its binary counterpart (BCF). All commands work
07332ca
transparently with both VCFs and BCFs, both uncompressed and BGZF-compressed.
07332ca
07332ca
(This BCFtools includes the polysomy subcommand, which is implemented using
07332ca
the GNU Scientific Library. Hence this package is licensed according to the
07332ca
GNU General Public License, rather than the MIT license used when BCFtools
07332ca
is built without the polysomy subcommand.)
07332ca
07332ca
07332ca
%prep
07332ca
%setup -q
07332ca
%patch0 -p1 -b .py3
07332ca
%patch1 -p1 -b .conf
07332ca
751c2d3
sed -i '1s|/usr/bin/env perl|/usr/bin/perl|' misc/*.pl misc/plot-vcfstats
751c2d3
sed -i '1s|/usr/bin/env python|%{__python3}|' misc/*.py
07332ca
07332ca
07332ca
%build
07332ca
%configure CFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}" \
07332ca
  --prefix=%{_prefix} \
751c2d3
  --with-htslib=system \
751c2d3
  --enable-perl-filters \
751c2d3
  --enable-libgsl \
07332ca
  --with-bcf-plugin-path='%{_usr}/local/libexec/bcftools:$(plugindir)'
07332ca
%make_build
07332ca
07332ca
07332ca
%install
07332ca
%make_install
07332ca
07332ca
07332ca
%check
751c2d3
# Check if bcftools is built with system htslib.
751c2d3
ldd bcftools | grep -E '/lib(64)?/libhts\.so\.'
751c2d3
07332ca
make test
07332ca
07332ca
07332ca
%files
07332ca
%doc AUTHORS NEWS
07332ca
%license LICENSE
751c2d3
# We do not use a wildcard to list bin files, because this often leads
751c2d3
# to problems when the name changes or something additional is installed.
751c2d3
%{_bindir}/bcftools
751c2d3
%{_bindir}/color-chrs.pl
751c2d3
%{_bindir}/guess-ploidy.py
751c2d3
%{_bindir}/plot-roh.py
751c2d3
%{_bindir}/plot-vcfstats
751c2d3
%{_bindir}/run-roh.pl
751c2d3
%{_bindir}/vcfutils.pl
07332ca
%{_libexecdir}/bcftools
07332ca
%{_mandir}/man1/bcftools.1*
07332ca
07332ca
07332ca
%changelog
a6c2358
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-2
a6c2358
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
a6c2358
751c2d3
* Tue Nov 19 2019 Jun Aruga <jaruga@redhat.com> - 1.9-1
751c2d3
- Exclude a CPU architecture s390x.
751c2d3
- Add Conflicts tag for samtools < 1.0.
751c2d3
- Align the field delimiter as 1 space.
751c2d3
- Use additional RPM macros for Source0.
751c2d3
- Add a logic to check if bcftools is built with system htslib.
751c2d3
- Update comments for license.
751c2d3
07332ca
* Wed Nov 06 2019 John Marshall <jmarshall@users.sourceforge.net> - 1.9-1
07332ca
- New spec file for bcftools, now separate from samtools (#1767792).
07332ca
- Backported Python 3 and configure patches from later upstream development.