Add macro virtual_conflicts_and_provides to be specfile more readable

This commit is contained in:
Filip Janus 2024-02-05 15:52:43 +01:00
parent ceda0e6f43
commit 9647cd2b64

View File

@ -189,11 +189,15 @@ Provides: %{majorname}%{?1:-%{1}}-any\
Conflicts: %{majorname}%{?1:-%{1}}-any\ Conflicts: %{majorname}%{?1:-%{1}}-any\
} }
%define virtual_conflicts_and_provides() %{expand:\
%conflict_with_other_streams %{**}\
%postgresqlXX_if_default %{**}\
}
Provides: %{pkgname} = %precise_version Provides: %{pkgname} = %precise_version
Provides: %{pkgname}%{?_isa} = %precise_version Provides: %{pkgname}%{?_isa} = %precise_version
%conflict_with_other_streams %virtual_conflicts_and_provides
%postgresqlXX_if_default
# https://bugzilla.redhat.com/1464368 # https://bugzilla.redhat.com/1464368
# and do not provide pkgconfig RPM provides (RHBZ#1980992) and #2121696 # and do not provide pkgconfig RPM provides (RHBZ#1980992) and #2121696
@ -228,8 +232,7 @@ Requires(postun): glibc
Provides: %{pkgname}-private-libs = %precise_version Provides: %{pkgname}-private-libs = %precise_version
Provides: %{pkgname}-private-libs%{?_isa} = %precise_version Provides: %{pkgname}-private-libs%{?_isa} = %precise_version
%postgresqlXX_if_default private-libs %virtual_conflicts_and_provides private-libs
%conflict_with_other_streams private-libs
%description -n %{pkgname}-private-libs %description -n %{pkgname}-private-libs
The postgresql-private-libs package provides the shared libraries for this The postgresql-private-libs package provides the shared libraries for this
@ -247,8 +250,7 @@ Conflicts: libpq-devel
Provides: %{pkgname}-devel = %precise_version Provides: %{pkgname}-devel = %precise_version
Provides: %{pkgname}-devel%{?_isa} = %precise_version Provides: %{pkgname}-devel%{?_isa} = %precise_version
%postgresqlXX_if_default private-devel %virtual_conflicts_and_provides private-devel
%conflict_with_other_streams private-devel
%description -n %{pkgname}-private-devel %description -n %{pkgname}-private-devel
The postgresql-private-devel package contains the header files and libraries The postgresql-private-devel package contains the header files and libraries
@ -283,8 +285,7 @@ Provides: %{pkgname}-server%{?_isa} = %precise_version
# Provide symbol regardless version. This symbol is present in every single # Provide symbol regardless version. This symbol is present in every single
# postgresql stream # postgresql stream
%postgresqlXX_if_default server %virtual_conflicts_and_provides server
%conflict_with_other_streams server
%description -n %{pkgname}-server %description -n %{pkgname}-server
PostgreSQL is an advanced Object-Relational database management system (DBMS). PostgreSQL is an advanced Object-Relational database management system (DBMS).
@ -299,8 +300,7 @@ Requires: %{pkgname}%{?_isa} = %precise_version
Provides: %{pkgname}-doc = %precise_version Provides: %{pkgname}-doc = %precise_version
Provides: %{pkgname}-docs = %precise_version Provides: %{pkgname}-docs = %precise_version
%postgresqlXX_if_default docs %virtual_conflicts_and_provides docs
%conflict_with_other_streams docs
%description -n %{pkgname}-docs %description -n %{pkgname}-docs
The postgresql-docs package contains some additional documentation for The postgresql-docs package contains some additional documentation for
@ -314,8 +314,7 @@ Requires: %{pkgname}%{?_isa} = %precise_version
Provides: %{pkgname}-contrib = %precise_version Provides: %{pkgname}-contrib = %precise_version
Provides: %{pkgname}-contrib%{?_isa} = %precise_version Provides: %{pkgname}-contrib%{?_isa} = %precise_version
%postgresqlXX_if_default contrib %virtual_conflicts_and_provides contrib
%conflict_with_other_streams contrib
%description -n %{pkgname}-contrib %description -n %{pkgname}-contrib
The postgresql-contrib package contains various extension modules that are The postgresql-contrib package contains various extension modules that are
@ -344,8 +343,7 @@ Requires: %{pkgname}-private-devel
Provides: %{pkgname}-server-devel = %precise_version Provides: %{pkgname}-server-devel = %precise_version
Provides: %{pkgname}-server-devel%{?_isa} = %precise_version Provides: %{pkgname}-server-devel%{?_isa} = %precise_version
%postgresqlXX_if_default server-devel %virtual_conflicts_and_provides server-devel
%conflict_with_other_streams server-devel
%description -n %{pkgname}-server-devel %description -n %{pkgname}-server-devel
The postgresql-server-devel package contains the header files and configuration The postgresql-server-devel package contains the header files and configuration
@ -370,8 +368,7 @@ Requires: %{pkgname}-server-devel%{?_isa} = %precise_version
Provides: %{pkgname}-static = %precise_version Provides: %{pkgname}-static = %precise_version
Provides: %{pkgname}-static%{?_isa} = %precise_version Provides: %{pkgname}-static%{?_isa} = %precise_version
%postgresqlXX_if_default static %virtual_conflicts_and_provides static
%conflict_with_other_streams static
%description -n %{pkgname}-static %description -n %{pkgname}-static
Statically linked PostgreSQL libraries that do not have dynamically linked Statically linked PostgreSQL libraries that do not have dynamically linked
@ -386,8 +383,7 @@ Provides: bundled(postgresql-server) = %prevversion
Provides: %{pkgname}-upgrade = %precise_version Provides: %{pkgname}-upgrade = %precise_version
Provides: %{pkgname}-upgrade%{?_isa} = %precise_version Provides: %{pkgname}-upgrade%{?_isa} = %precise_version
%postgresqlXX_if_default upgrade %virtual_conflicts_and_provides upgrade
%conflict_with_other_streams upgrade
%description -n %{pkgname}-upgrade %description -n %{pkgname}-upgrade
The postgresql-upgrade package contains the pg_upgrade utility and supporting The postgresql-upgrade package contains the pg_upgrade utility and supporting
@ -401,8 +397,7 @@ Requires: %{pkgname}-upgrade%{?_isa} = %precise_version
Provides: %{pkgname}-upgrade-devel = %precise_version Provides: %{pkgname}-upgrade-devel = %precise_version
Provides: %{pkgname}-upgrade-devel%{?_isa} = %precise_version Provides: %{pkgname}-upgrade-devel%{?_isa} = %precise_version
%postgresqlXX_if_default upgrade-devel %virtual_conflicts_and_provides upgrade-devel
%conflict_with_other_streams upgrade-devel
%description -n %{pkgname}-upgrade-devel %description -n %{pkgname}-upgrade-devel
The postgresql-devel package contains the header files and libraries The postgresql-devel package contains the header files and libraries
@ -423,8 +418,7 @@ BuildRequires: perl(Data::Dumper)
Provides: %{pkgname}-plperl = %precise_version Provides: %{pkgname}-plperl = %precise_version
Provides: %{pkgname}-plperl%{?_isa} = %precise_version Provides: %{pkgname}-plperl%{?_isa} = %precise_version
%postgresqlXX_if_default plperl %virtual_conflicts_and_provides plperl
%conflict_with_other_streams plperl
%description -n %{pkgname}-plperl %description -n %{pkgname}-plperl
The postgresql-plperl package contains the PL/Perl procedural language, The postgresql-plperl package contains the PL/Perl procedural language,
@ -440,8 +434,7 @@ Requires: %{pkgname}-server%{?_isa} = %precise_version
Provides: %{pkgname}-plpython3 = %precise_version Provides: %{pkgname}-plpython3 = %precise_version
Provides: %{pkgname}-plpython3%{?_isa} = %precise_version Provides: %{pkgname}-plpython3%{?_isa} = %precise_version
%postgresqlXX_if_default python3 %virtual_conflicts_and_provides python3
%conflict_with_other_streams python3
%description -n %{pkgname}-plpython3 %description -n %{pkgname}-plpython3
The postgresql-plpython3 package contains the PL/Python3 procedural language, The postgresql-plpython3 package contains the PL/Python3 procedural language,
@ -457,8 +450,7 @@ Requires: %{pkgname}-server%{?_isa} = %precise_version
Provides: %{pkgname}-pltcl = %precise_version Provides: %{pkgname}-pltcl = %precise_version
Provides: %{pkgname}-pltcl%{?_isa} = %precise_version Provides: %{pkgname}-pltcl%{?_isa} = %precise_version
%postgresqlXX_if_default pltcl %virtual_conflicts_and_provides plctl
%conflict_with_other_streams plctl
%description -n %{pkgname}-pltcl %description -n %{pkgname}-pltcl
The postgresql-pltcl package contains the PL/Tcl procedural language, The postgresql-pltcl package contains the PL/Tcl procedural language,
@ -476,8 +468,7 @@ Requires: %{pkgname}-contrib%{?_isa} = %precise_version
Provides: %{pkgname}-test = %precise_version Provides: %{pkgname}-test = %precise_version
Provides: %{pkgname}-test%{?_isa} = %precise_version Provides: %{pkgname}-test%{?_isa} = %precise_version
%postgresqlXX_if_default test %virtual_conflicts_and_provides test
%conflict_with_other_streams test
%description -n %{pkgname}-test %description -n %{pkgname}-test
The postgresql-test package contains files needed for various tests for the The postgresql-test package contains files needed for various tests for the
@ -500,8 +491,7 @@ Provides: %{pkgname}-llvmjit%{?_isa} = %precise_version
BuildRequires: llvm-devel >= 5.0 clang-devel >= 5.0 BuildRequires: llvm-devel >= 5.0 clang-devel >= 5.0
%postgresqlXX_if_default llvmjit %virtual_conflicts_and_provides llvmjit
%conflict_with_other_streams llvmjit
%description -n %{pkgname}-llvmjit %description -n %{pkgname}-llvmjit
The postgresql-llvmjit package contains support for The postgresql-llvmjit package contains support for