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