diff --git a/postgresql16-pg_repack.spec b/postgresql16-pg_repack.spec index ce62bcc..d607c99 100644 --- a/postgresql16-pg_repack.spec +++ b/postgresql16-pg_repack.spec @@ -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 - 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š - 1.4.8-4 - Build without modules