File pg_auto_failover.spec of Package pg_auto_failover
#
# Copyright (c) 2021 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/
#
# Those variables are important as they are used by pg_* macros below
%define pg_name @BUILD_FLAVOR@%{nil}
%define ext_name pg_auto_failover
%{pg_version_from_name}
Name: %{pg_name}-%{ext_name}
Version: 2.2
Release: 0
Summary: Postgres extension and service for automated failover and high-availability
License: BSD-3-Clause
Group: Productivity/Databases/Servers
Url: https://github.com/citusdata/pg_auto_failover
Source0: https://github.com/citusdata/pg_auto_failover/archive/refs/tags/v%{version}.tar.gz#/%{ext_name}-%{version}.tar.gz
BuildRequires: %{pg_name}-llvmjit-devel
BuildRequires: pkgconfig(liblz4)
BuildRequires: pkgconfig(libzstd)
%pg_server_requires
%if "%{pg_name}" == ""
ExclusiveArch: do_not_build
%endif
%description
pg_auto_failover is an extension and service for PostgreSQL that monitors and
manages automated failover for a Postgres cluster. It is optimized for
simplicity and correctness and supports Postgres 10 and newer.
%prep
%autosetup -p1 -n %{ext_name}-%{version}
%build
%make_pgxs
%install
%make_install
%post
%{_datadir}/postgresql/install-alternatives %{pg_version}
%postun
%{_datadir}/postgresql/install-alternatives %{pg_version}
%files
%doc *.md NOTICE
%license LICENSE
%ghost %{_bindir}/pg_autoctl
%{pg_config_bindir}/pg_autoctl
%{pg_config_sharedir}/extension/pgautofailover*
%{pg_config_pkglibdir}/pgautofailover.so
%if %{postgresql_has_llvm}
%{pg_config_pkglibdir}/bitcode/*
%endif
%changelog