File xdelta3.spec of Package xdelta3

# spec file for package xdelta3
# Copyright (c) 2019 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

Name:           xdelta3
Version:        3.1.0
Release:        0
Summary:        A diff utility which works with binary files
License:        GPL-2.0-only AND Apache-2.0
Group:          Productivity/Archiving/Compression
BuildRequires:  gcc-c++
%if 0%{?opensuse}
# Dependency of tests
BuildRequires:  ncompress
BuildRequires:  python
BuildRequires:  xz-devel
# xdelta is being dropped
Provides:       xdelta = %{version}
Obsoletes:      xdelta < %{version}

Xdelta3 is a set of tools designed to compute changes between
binary files.  These changes (delta files) are similar to the output of the
"diff" program, in that they may be used to store and transmit only the
changes between files.  The "delta files" that Xdelta3 manages are
stored in RFC3284 (VCDIFF) format.

%setup -q

%if %{do_profiling}
  make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" CXXFLAGS="%{optflags} %{cflags_profile_generate}"
  ./xdelta3 test 
  make clean
  make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}" CXXFLAGS="%{optflags} %{cflags_profile_feedback}"
  make %{?_smp_mflags} CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"


# Create compat symlinks
ln -sv %{_bindir}/xdelta3 \
ln -sv %{_mandir}/man1/xdelta3.1 \

./xdelta3 test

%defattr(-, root, root)