#
# spec file for package par2cmdline
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


Name:           par2cmdline-mt
Version:        0.6.14.20170417
Release:        2.1
Summary:        PAR 2.0 compatible file verification and repair tool
License:        GPL-2.0
Group:          Productivity/File utilities
# git clone
# git clone https://github.com/jkansanen/par2cmdline-mt.git
Url:            https://github.com/jkansanen/par2cmdline-mt
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
Provides:       par2 = %{version}
Obsoletes:      par2 <= 0.4
# corecct link to relative
Patch1:         par2cmdline-link.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
par2cmdline is a program for creating and using PAR2 files to detect
damage in data files and repair them if necessary. It can be used with
any kind of file.

%prep
%setup -q
chmod -x ChangeLog

%patch1 -p1

%build
aclocal
automake --add-missing
autoconf
%configure
make %{?_smp_mflags}

%check
make check

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}


%{__mv} %{buildroot}%{_bindir}/par2 %{buildroot}%{_bindir}/par2-mt
%{__ln_s} par2-mt %{buildroot}%{_bindir}/par2


%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
%{_bindir}/par2*
%doc %{_mandir}/man?/*

%changelog
* Wed Aug  5 2015 xrigou@otenet.gr
- Update to 0.6.14.
* Thu Apr  2 2015 xrigou@otenet.gr
- Update to 0.6.11.
- Apply spec-cleaner 0.6.8.
* Sat Sep 13 2014 xrigou@otenet.gr
- Update to 0.6.9.
* Sat Mar  1 2014 xrigou@otenet.gr
- Remove the external manpages.
* Sat Mar  1 2014 xrigou@otenet.gr
- Update to v0.6.5.
- Apply spec-cleaner.
* Sat Jan 25 2014 xrigou@otenet.gr
- Update to v0.6.4.
- Do not make checks.
* Sun Aug 19 2012 xgpub@tellas.gr
- Update to v0.5.4 (forked version from github).
* Wed Nov  9 2011 lazy.kent@opensuse.org
- Added COPYING to docs.
- Corrected License tag.
- Use full URL as a source.
- Clean up spec.
* Sun Aug  1 2010 lazy.kent.suse@gmail.com
- Applied Debian patches.
- Added make check.
- Added manpages From Debian project.
- Added mar2 to obsoletes.
* Fri Dec 11 2009 lazy.kent.suse@gmail.com
- Patch refresh.
* Thu Oct 15 2009 lazy.kent.suse@gmail.com
- Renamed to par2cmdline.
- Corrected Summary and Description.
- Added Authors.
* Sat Mar 21 2009 lazy.kent.suse@gmail.com
- Initial package created - 0.4.