Name:           Control-FREEC
Version:        11.6
Release:        2
Summary:        Copy number and genotype annotation in whole genome and whole exome sequencing data

License:        GPL-2.0
URL:            https://github.com/BoevaLab/FREEC
Source0:        https://github.com/BoevaLab/FREEC/archive/refs/tags/v%{version}.tar.gz#/FREEC-%{version}.tar.gz
Source1:        https://www.gnu.org/licenses/old-licenses/gpl-2.0.html#/LICENSE

BuildRequires:  gcc-c++ glibc-devel libgcc libstdc++-devel zlib

Provides:       freec = %{version}-%{release}

%description
Control-FREEC is a tool for detection of copy-number changes and allelic 
imbalances (including LOH) using deep-sequencing data originally developed
by the Bioinformatics Laboratory of Institut Curie (Paris). Since 2016, the
project has moved to Insitut Cochin, INSERM U1016 (Paris).

Control-FREEC automatically computes, normalizes, segments copy number and
beta allele frequency (BAF) profiles, then calls copy number alterations and
LOH. The control (matched normal) sample is optional for whole genome
sequencing data but mandatory for whole exome or targeted sequencing data.
For whole genome sequencing data analysis, the program can also use mappability
data (files created by GEM).


%prep
%autosetup -n FREEC-%{version}
install -m 0644 %{SOURCE1} .


%build
%make_build -C src


%install
install -D -p -m 0755 src/freec %{buildroot}%{_bindir}/freec

install -d -p -m 0755 %{buildroot}%{_datadir}/%{name}/{data,scripts}
install -p -m 0644 ./data/config*.txt %{buildroot}%{_datadir}/%{name}/data/
install -p -m 0644 ./scripts/* %{buildroot}%{_datadir}/%{name}/scripts/


%files
%license LICENSE
%doc README.md
%{_bindir}/freec
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/data
%{_datadir}/%{name}/scripts


%changelog
* Wed Apr 06 2022 herengui <herengui@uniontech.com> - 11.6-2
- fix build error

* Wed Nov 17 2021 herengui <herengui@uniontech.com> - 11.6-1
- Initial package.