Add -any symbol

release bump
add macro postgresql_default to be ablr to set up the default version of
package in distribudion
This commit is contained in:
Filip Janus 2023-12-11 10:35:19 +01:00
parent 7b59700d5a
commit cab3333af5

View File

@ -1,14 +1,24 @@
%{!?postgresql_default:%global postgresql_default 1}
%global majorname pg_repack
%global pgversion 16
Name: postgresql%{pgversion}-%{majorname}
Version: 1.4.8
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Reorganize tables in PostgreSQL databases without any locks
License: BSD-3-Clause
URL: http://reorg.github.io/%{majorname}/
Source0: https://github.com/reorg/%{majorname}/archive/ver_%{version}.tar.gz
%if %?postgresql_default
%global pkgname %{majorname}
%package -n %{pkgname}
Summary: Reorganize tables in PostgreSQL databases without any locks
%else
%global pkgname %name
%endif
BuildRequires: make
BuildRequires: gcc, openssl-devel, lz4-devel
BuildRequires: postgresql-server-devel >= 16, postgresql-server-devel < 17
@ -19,9 +29,13 @@ BuildRequires: python3-docutils
Requires(pre): postgresql-server >= 16, postgresql-server < 17
%global precise_version %{?epoch:%epoch:}%version-%release
Provides: %{majorname} = %precise_version
Provides: %{majorname}%{?_isa} = %precise_version
Conflicts: %{majorname}
Provides: %{pkgname} = %precise_version
%if %?postgresql_default
Provides: postgresql-%{majorname} = %precise_version
%endif
Provides: %{pkgname}%{?_isa} = %precise_version
Provides: %{majorname}-any
Conflicts: %{pkgname}
%description
pg_repack is a PostgreSQL extension which lets you remove
@ -34,6 +48,19 @@ with performance comparable to using CLUSTER directly.
Please check the documentation (in the doc directory or online)
for installation and usage instructions.
%description -n %{pkgname}
pg_repack is a PostgreSQL extension which lets you remove
bloat from tables and indexes, and optionally
restore the physical order of clustered indexes.
Unlike CLUSTER and VACUUM FULL it works online,
without holding an exclusive lock on the processed tables during processing.
pg_repack is efficient to boot,
with performance comparable to using CLUSTER directly.
Please check the documentation (in the doc directory or online)
for installation and usage instructions.
%prep
%setup -n %{majorname}-ver_%{version} -q
@ -48,7 +75,7 @@ make
%install
%make_install
%files
%files -n %{pkgname}
%{_bindir}/%{majorname}
%{_libdir}/pgsql/%{majorname}.so
%if 0%{?postgresql_server_llvmjit}
@ -71,6 +98,10 @@ make
%changelog
* Wed Dec 06 2023 Filip Janus <fjanus@redhat.com> - 1.4.8-5
- Add postgresql_default macro to be able to decide which version of extension
is the default one in the repository
* Mon Apr 24 2023 Filip Januš <fjanus@redhat.com> - 1.4.8-4
- Build without modules