152 lines
2.7 KiB
Plaintext
152 lines
2.7 KiB
Plaintext
%global gittag v%{version}
|
|
|
|
%global debug_package %{nil}
|
|
%global _missing_build_ids_terminate_build 0
|
|
|
|
%bcond postgresql 1
|
|
%bcond mysql 0
|
|
%bcond sqlserver 0
|
|
|
|
%bcond lzo 1
|
|
%bcond brotli 0
|
|
%bcond libsodium 0
|
|
|
|
Name: wal-g
|
|
Version: 3.0.3
|
|
Release: 1%{?dist}
|
|
Summary: Archival and Restoration for databases in the Cloud
|
|
|
|
License: Apache-2.0
|
|
URL: https://github.com/wal-g/wal-g
|
|
Source: %{name}-%{version}.tar.gz
|
|
|
|
BuildRequires: golang
|
|
BuildRequires: git-core
|
|
%if %{with lzo}
|
|
BuildRequires: lzo-devel
|
|
%endif
|
|
%if %{with brotli}
|
|
BuildRequires: brotli-devel
|
|
%endif
|
|
%if %{with libsodium}
|
|
BuildRequires: libsodium-devel
|
|
%endif
|
|
|
|
%description
|
|
WAL-G is an archival restoration tool for PostgreSQL, MySQL/MariaDB, and MS SQL
|
|
Server (beta for MongoDB and Redis).
|
|
|
|
WAL-G is the successor of WAL-E with a number of key differences. WAL-G uses
|
|
LZ4, LZMA, ZSTD, or Brotli compression, multiple processors, and non-exclusive
|
|
base backups for Postgres. More information on the original design and
|
|
implementation of WAL-G can be found on the Citus Data blog post "Introducing
|
|
WAL-G by Citus: Faster Disaster Recovery for Postgres".
|
|
|
|
%package daemon-client
|
|
Summary: walg-daemon-client utility
|
|
Requires: %{name} = %{version}
|
|
|
|
%description daemon-client
|
|
walg-daemon-client is lightweight client for WAL-G daemon.
|
|
|
|
|
|
%if %{with postgresql}
|
|
%package postgresql
|
|
Summary: wal-g for PostgreSQL
|
|
Requires: %{name} = %{version}
|
|
|
|
%description postgresql
|
|
%{summary}
|
|
%endif
|
|
|
|
|
|
%if %{with mysql}
|
|
%package mysql
|
|
Summary: wal-g for MySQL/MariaDB
|
|
Requires: %{name} = %{version}
|
|
|
|
%description mysql
|
|
%{summary}
|
|
%endif
|
|
|
|
%if %{with sqlserver}
|
|
%package sqlserver
|
|
Summary: wal-g for SQLServer
|
|
Requires: %{name} = %{version}
|
|
|
|
%description sqlserver
|
|
%{summary}
|
|
%endif
|
|
|
|
|
|
%prep
|
|
%autosetup -n wal-g-%{version}
|
|
|
|
|
|
%build
|
|
%if %{with lzo}
|
|
export USE_LZO=1
|
|
%endif
|
|
%if %{with brotli}
|
|
export USE_BROTLI=1
|
|
%endif
|
|
%if %{with libsodium}
|
|
export USE_LIBSODIUM=1
|
|
%endif
|
|
|
|
%if %{with postgresql}
|
|
make pg_build
|
|
%endif
|
|
%if %{with mysql}
|
|
make mysql_build
|
|
%endif
|
|
%if %{with sqlserver}
|
|
make sqlserver_build
|
|
%endif
|
|
|
|
make build_client
|
|
|
|
|
|
%install
|
|
%{__install} -d %{buildroot}%{_bindir}
|
|
|
|
%if %{with postgresql}
|
|
%{__install} main/pg/wal-g %{buildroot}%{_bindir}/wal-g-pg
|
|
%endif
|
|
%if %{with mysql}
|
|
%{__install} main/mysql/wal-g %{buildroot}%{_bindir}/wal-g-mysql
|
|
%endif
|
|
%if %{with sqlserver}
|
|
%{__install} main/sqlserver/wal-g %{buildroot}%{_bindir}/wal-g-sqlserver
|
|
%endif
|
|
|
|
%{__install} bin/walg-daemon-client %{buildroot}%{_bindir}/
|
|
|
|
%check
|
|
|
|
|
|
%files
|
|
%license LICENSE.md
|
|
|
|
%files daemon-client
|
|
%{_bindir}/walg-daemon-client
|
|
|
|
%if %{with postgresql}
|
|
%files postgresql
|
|
%{_bindir}/wal-g-pg
|
|
%endif
|
|
|
|
%if %{with mysql}
|
|
%files mysql
|
|
%{_bindir}/wal-g-mysql
|
|
%endif
|
|
|
|
%if %{with sqlserver}
|
|
%files sqlserver
|
|
%{_bindir}/wal-g-sqlserver
|
|
%endif
|
|
|
|
|
|
%changelog
|
|
%autochangelog
|