File mydumper.spec of Package mydumper

#
# spec file for package mydumper
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2018-2021, James Pearson <jamesp@vicidial.com>
#
# 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/
#

# They do extra versions with a - instead of a . and OBS hates that, I.E. 0.11.3-5 as opposed to 0.11.3.5
# So the minorversion below is used to adjust for that madness
%define revision 1

Name:           mydumper
Version:        0.20.12
Release:        1
Summary:        A better mysqldump replacement with modern features
License:        GPL-3.0-or-later
Group:          Productivity/Databases/Tools
URL:            https://github.com/mydumper/mydumper
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  libglib-2_0-0
BuildRequires:  libpcap-devel
BuildRequires:  libmysqlclient-devel
BuildRequires:  libzstd-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libcrypto)
BuildRequires:  pkgconfig(libpcre)
BuildRequires:  pkgconfig(libssl)
BuildRequires:  pkgconfig(zlib)
#BuildRequires:  libopenssl-1_1-devel
#Patch1:         test.patch

%if %{revision} == 0
Source:         https://github.com/mydumper/mydumper/archive/refs/tags/v%{version}.tar.gz
%define srcdir mydumper-%{version}
%endif
%if %{revision} > 0
Source:         https://github.com/mydumper/mydumper/archive/refs/tags/v%{version}-%{revision}.tar.gz
%define srcdir mydumper-%{version}-%{revision}
%endif


%description
MyDumper is a modern and logical take on mysqldump to provide a more modern
feature set and useful backups. It consists of the 'mydumper' and it's
complimentary utility 'myloader'.

The primary reasons for using this utility are:

1. Parallelism (hence, speed) and performance (avoids expensive character set
   conversion routines, efficient code overall, inline compression, etc)
2. Easier to manage output (separate files for tables, dump metadata, etc, easy
   to view/parse data)
3. Consistency - maintains snapshot across all threads, provides accurate
   master and slave log positions, etc
4. Manageability - supports PCRE for specifying database and tables inclusions
   and exclusions

This package is not compiled with SSL support because of dependencies on the
percona SQL server libraries.

Authors:
--------
   Andrew Hutchins <andrew.hutchins@sun.com>
   Domas Mituzas <domas@dammit.lt>
   Mark Leith <mark.leith@sun.com>
   Max Bubenick <max.bubenick@percona.com>


%prep
%setup -q -n %{srcdir}
#%patch -P 1 -p1

%build
# Blah
export CFLAGS="%{optflags} -Wno-unused-function"
cmake -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
      -DCMAKE_C_FLAGS="$CFLAGS" \
      -DCMAKE_CXX_FLAGS="$CFLAGS" \
      -DWITH_SSL=ON .
make %{?_smp_mflags} VERBOSE=1


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_datadir}/doc/%{name}/html/.buildinfo


%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_bindir}/mydumper
%{_bindir}/myloader
%config %{_sysconfdir}/mydumper.cnf

%changelog
openSUSE Build Service is sponsored by