File par2cmdline-turbo.spec of Package par2cmdline-turbo

#
# spec file for package par2cmdline-turbo
#
# Copyright (c) 2020 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:           par2cmdline-turbo
Version:        1.3.x
Release:        0
Summary:        A PAR 2.0 compatible file creation, verification, and repair tool
License:        GPL-2.0-or-later
Group:          Productivity/Archiving/Backup
URL:            https://github.com/animetosho/par2cmdline-turbo
Source:         %{name}-%{version}.tar.xz
%if 0%{?suse_version} <= 1600 
BuildRequires:   gcc13
BuildRequires:   gcc13-c++
%else
BuildRequires:   gcc-c++
%endif
BuildRequires:  automake
BuildRequires:  autoconf
BuildRequires:  libtool
# The following 2 provides/obsoletes lines have been added becase at one point
# the 'par' package was updated to use the 'par2cmdline' sources. Any package
# that depends on 'par' version 0.8.0 should actually depend on 'par2cmdline'
# version 0.8.0.  The last/latest version of 'par' package should be 1.1 which
# makes this "relatively" safe to do.
Provides:       par = 1.2.0
Obsoletes:      par < 1.2.0
Obsoletes:      par2cmdline
Provides:       par2 = %{version}

%description
This is a simple fork of par2cmdline which replaces core computation routines with ParPar’s processing backend,
improving par2cmdline’s performance on x86/ARM platforms.

%prep
%setup -q -n  %{name}-%{version}
# Remove executable permission from text files
chmod -x ChangeLog configure.ac INSTALL Makefile.am NEWS stamp-h.in

%build
%if 0%{?suse_version} <= 1600
test -x "$(type -p gcc-13)" && export CC="$_"
test -x "$(type -p g++-13)" && export CXX="$_"
%endif

./automake.sh
%configure
%make_build

%install
%make_install

%check
%make_build check

%files
%doc AUTHORS ChangeLog README.md
%license COPYING
%{_bindir}/par2
%{_bindir}/par2create
%{_bindir}/par2repair
%{_bindir}/par2verify
%{_mandir}/man1/par2.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by