File vcftools.spec of Package vcftools

#
# spec file for package vcftools
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           vcftools
Version:        0.1.16
Release:        0
Summary:        Tools for manipulating VCF files (Variant Call Format)
License:        GPL-3.0-only
Group:          Productivity/Scientific/Other
URL:            https://vcftools.github.io/
Source:         https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  perl
BuildRequires:  pkgconfig
BuildRequires:  zlib-devel

%description
VCFtools is a set of tools written in Perl and C++ for working with VCF files
(Variant Call Format), such as those generated by the 1000 Genomes Project.

%prep
%setup -q
chmod -x LICENSE
chmod -x README.md

%build
# Remove prefix from perl_vendorarch to set up the pmdir
perl_vendorarch_short=`echo "%{perl_vendorarch}" | sed 's:%{_prefix}/:/:'`
%configure --with-pmdir=${perl_vendorarch_short}
%make_build

%install
%make_install

# CONVERT env HASHBANGS TO USE DIRECT EXECUTABLE
perlbin=`which perl`
sed -i "1 {s:/usr/bin/env perl:${perlbin}:}" \
  %{buildroot}/%{_bindir}/fill-* \
  %{buildroot}/%{_bindir}/vcf-*

%files
%license LICENSE
%doc README.md
%{_bindir}/*
%{_mandir}/man1/vcftools.1%{?ext_man}
%{perl_vendorarch}/FaSlice.pm
%{perl_vendorarch}/Vcf.pm
%{perl_vendorarch}/VcfStats.pm

%changelog
openSUSE Build Service is sponsored by