Add new sub-packages private-libs and private-devel

This keeps the client and server devel packages separated
This commit is contained in:
Honza Horak 2021-06-07 12:22:48 +02:00
parent 9e2fd57bf2
commit d12fb440d2

View File

@ -194,6 +194,35 @@ over a network connection. The PostgreSQL server can be found in the
postgresql-server sub-package. postgresql-server sub-package.
%if ! %external_libpq
%package private-libs
Summary: The shared libraries required only for this build of PostgreSQL server
Group: Applications/Databases
# for /sbin/ldconfig
Requires(post): glibc
Requires(postun): glibc
%description private-libs
The postgresql-private-libs package provides the shared libraries for this
build of PostgreSQL server and plugins build with this version of server.
For shared libraries used by client packages that need to connect to a
PostgreSQL server, install libpq package instead.
%package private-devel
Summary: PostgreSQL development header files for this build of PostgreSQL server
Group: Development/Libraries
Requires: %{name}-private-libs%{?_isa} = %precise_version
%description private-devel
The postgresql-private-devel package contains the header files and libraries
needed to compile C or C++ applications which will directly interact
with a PostgreSQL database management server.
You need to install this package if you want to develop applications which
will interact with a PostgreSQL server.
%endif
%package server %package server
Summary: The programs needed to create and run a PostgreSQL server Summary: The programs needed to create and run a PostgreSQL server
Requires: %{name}%{?_isa} = %precise_version Requires: %{name}%{?_isa} = %precise_version
@ -249,6 +278,9 @@ Requires: krb5-devel
%if %llvmjit %if %llvmjit
Requires: clang-devel llvm-devel Requires: clang-devel llvm-devel
%endif %endif
%if ! %external_libpq
Requires: %{name}-private-devel
%endif
%description server-devel %description server-devel
The postgresql-server-devel package contains the header files and configuration The postgresql-server-devel package contains the header files and configuration
@ -862,10 +894,14 @@ make -C postgresql-setup-%{setup_version} check
# so that extensions can use this dir. # so that extensions can use this dir.
%dir %{_libdir}/pgsql/bitcode %dir %{_libdir}/pgsql/bitcode
%endif %endif
%if ! %external_libpq %if ! %external_libpq
%files private-libs
%{_libdir}/libpq.so.* %{_libdir}/libpq.so.*
%endif %endif
%files docs %files docs
%doc *-US.pdf %doc *-US.pdf
%doc doc/html %doc doc/html
@ -1092,7 +1128,10 @@ make -C postgresql-setup-%{setup_version} check
%{_mandir}/man1/pg_server_config.* %{_mandir}/man1/pg_server_config.*
%{_mandir}/man3/SPI_* %{_mandir}/man3/SPI_*
%{macrosdir}/macros.%name %{macrosdir}/macros.%name
%if ! %external_libpq %if ! %external_libpq
%files private-devel
%{_bindir}/pg_config %{_bindir}/pg_config
%{_includedir}/libpq-events.h %{_includedir}/libpq-events.h
%{_includedir}/libpq-fe.h %{_includedir}/libpq-fe.h