File citus.spec of Package citus

#
# 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/
#

# Those variables are important as they are used by pg_* macros below
%define pg_name  @BUILD_FLAVOR@%{nil}
%define ext_name citus
%{pg_version_from_name}

Name:           %{pg_name}-%{ext_name}
Version:        13.2.0
Release:        0
Summary:        Distributed PostgreSQL extension for multi-tenant and real-time analytics workloads
License:        AGPL-3.0
URL:            https://github.com/citusdata/citus
Source:         https://github.com/citusdata/citus/archive/refs/tags/v%{version}.tar.gz#/%{ext_name}-%{version}.tar.gz
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(liblz4)
BuildRequires:  pkgconfig(libzstd)
BuildRequires:  libicu-devel

BuildRequires:  %{pg_name}-llvmjit-devel
%pg_server_requires
%if "%{pg_name}" == ""
ExclusiveArch:  do_not_build
%endif

%description
Distributed PostgreSQL extension for multi-tenant and real-time analytics workloads

%package devel
Requires:       %{pg_name}-%{ext_name} = %{version}
#
Summary:        Distributed PostgreSQL extension for multi-tenant and real-time analytics workloads
%description devel
Distributed PostgreSQL extension for multi-tenant and real-time analytics workloads

This package holds the development files.

%prep
%autosetup -n %{ext_name}-%{version}

%build
%configure
%make_build

%install
%make_install

%post
%{_datadir}/postgresql/install-alternatives %{pg_version}

%postun
%{_datadir}/postgresql/install-alternatives %{pg_version}

%files
%license LICENSE
%doc *.md
%{pg_config_pkglibdir}/%{ext_name}.so
%{pg_config_pkglibdir}/citus_columnar.so
%dir %{pg_config_pkglibdir}/citus_decoders/
%{pg_config_pkglibdir}/citus_decoders/pgoutput.so
%{pg_config_pkglibdir}/citus_decoders/wal2json.so
%{pg_config_pkglibdir}/citus_pgoutput.so
%{pg_config_pkglibdir}/citus_wal2json.so
%{pg_config_sharedir}/extension/%{ext_name}*
%{pg_config_sharedir}/extension/columnar*
%if %{postgresql_has_llvm}
%{pg_config_pkglibdir}/bitcode/*
%endif


%files devel
%{pg_config_includedir}/server/distributed/
%{pg_config_includedir}/server/citus_version.h

%changelog
openSUSE Build Service is sponsored by