2020-07-28 13:44:01 +00:00
|
|
|
%global majorversion 12
|
|
|
|
%global obsoletes_version %( echo $(( %majorversion + 1 )) )
|
2019-08-01 17:37:17 +00:00
|
|
|
|
|
|
|
Summary: PostgreSQL client library
|
|
|
|
Name: libpq
|
2020-07-28 13:44:01 +00:00
|
|
|
Version: %{majorversion}.1
|
|
|
|
Release: 3%{?dist}
|
2019-08-01 17:37:17 +00:00
|
|
|
|
|
|
|
License: PostgreSQL
|
|
|
|
Url: http://www.postgresql.org/
|
|
|
|
|
2020-07-28 13:44:01 +00:00
|
|
|
Source0: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
|
|
|
|
Source1: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2.sha256
|
2019-08-01 17:37:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Comments for these patches are in the patch files.
|
|
|
|
Patch1: libpq-10.3-rpm-pgsql.patch
|
|
|
|
Patch2: libpq-10.3-var-run-socket.patch
|
2020-07-28 13:44:01 +00:00
|
|
|
Patch3: libpq-12.0-symbol-versioning.patch
|
2019-08-01 17:37:17 +00:00
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: glibc-devel bison flex gawk
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: krb5-devel
|
|
|
|
BuildRequires: openldap-devel
|
|
|
|
BuildRequires: gettext
|
|
|
|
BuildRequires: multilib-rpm-config
|
|
|
|
|
2020-07-28 13:44:01 +00:00
|
|
|
Obsoletes: postgresql-libs < %obsoletes_version
|
|
|
|
Provides: postgresql-libs = %version-%release
|
|
|
|
|
2019-08-01 17:37:17 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
The libpq package provides the essential shared library for any PostgreSQL
|
|
|
|
client program or interface. You will need to install this package to use any
|
|
|
|
other PostgreSQL package or any clients that need to connect to a PostgreSQL
|
|
|
|
server.
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for building PostgreSQL client tools
|
|
|
|
Requires: %name%{?_isa} = %version-%release
|
|
|
|
# Historically we had 'postgresql-devel' package which was used for building
|
|
|
|
# both PG clients and PG server modules; let's have this fake provide to cover
|
|
|
|
# most of the depending packages and the rest (those which want to build server
|
|
|
|
# modules) need to be fixed to require postgresql-server-devel package.
|
|
|
|
Provides: postgresql-devel = %version-%release
|
2020-07-28 13:44:01 +00:00
|
|
|
Obsoletes: postgresql-devel < %obsoletes_version
|
2019-08-01 17:37:17 +00:00
|
|
|
|
2020-07-28 13:44:01 +00:00
|
|
|
%description devel
|
2019-08-01 17:37:17 +00:00
|
|
|
The libpq package provides the essential shared library for any PostgreSQL
|
|
|
|
client program or interface. You will need to install this package to build any
|
|
|
|
package or any clients that need to connect to a PostgreSQL server.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-07-28 13:44:01 +00:00
|
|
|
( cd "$(dirname "%SOURCE1")" ; sha256sum -c "%SOURCE1" )
|
|
|
|
%autosetup -n postgresql-%{version} -p1
|
2019-08-01 17:37:17 +00:00
|
|
|
|
|
|
|
# remove .gitignore files to ensure none get into the RPMs (bug #642210)
|
|
|
|
find . -type f -name .gitignore | xargs rm
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
2020-07-28 13:44:01 +00:00
|
|
|
# complements symbol-versioning patch
|
2019-08-01 17:37:17 +00:00
|
|
|
export SYMBOL_VERSION_PREFIX=RHPG_
|
|
|
|
|
2020-07-28 13:44:01 +00:00
|
|
|
# We don't build server nor client (e.g. /bin/psql) binaries in this package, so
|
|
|
|
# we can disable some configure options.
|
2019-08-01 17:37:17 +00:00
|
|
|
%configure \
|
2020-07-28 13:44:01 +00:00
|
|
|
--disable-rpath \
|
|
|
|
--with-ldap \
|
|
|
|
--with-openssl \
|
|
|
|
--with-gssapi \
|
|
|
|
--enable-nls \
|
|
|
|
--without-readline \
|
|
|
|
--datadir=%_datadir/pgsql
|
2019-08-01 17:37:17 +00:00
|
|
|
|
|
|
|
%global build_subdirs \\\
|
2020-07-28 13:44:01 +00:00
|
|
|
src/include \\\
|
|
|
|
src/common \\\
|
|
|
|
src/port \\\
|
|
|
|
src/interfaces/libpq \\\
|
|
|
|
src/bin/pg_config
|
2019-08-01 17:37:17 +00:00
|
|
|
|
|
|
|
for subdir in %build_subdirs; do
|
2020-07-28 13:44:01 +00:00
|
|
|
%make_build -C "$subdir"
|
2019-08-01 17:37:17 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
for subdir in %build_subdirs; do
|
2020-07-28 13:44:01 +00:00
|
|
|
%make_install -C "$subdir"
|
2019-08-01 17:37:17 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
# remove files not to be packaged
|
2020-07-28 13:44:01 +00:00
|
|
|
find $RPM_BUILD_ROOT -name '*.a' -delete
|
2019-08-01 17:37:17 +00:00
|
|
|
rm -r $RPM_BUILD_ROOT%_includedir/pgsql/server
|
|
|
|
|
2020-07-28 13:44:01 +00:00
|
|
|
%multilib_fix_c_header --file "%_includedir/pg_config.h"
|
|
|
|
%multilib_fix_c_header --file "%_includedir/pg_config_ext.h"
|
2019-08-01 17:37:17 +00:00
|
|
|
|
|
|
|
find_lang_bins ()
|
|
|
|
{
|
2020-07-28 13:44:01 +00:00
|
|
|
lstfile=$1 ; shift
|
|
|
|
cp /dev/null "$lstfile"
|
|
|
|
for binary; do
|
|
|
|
%find_lang "$binary"-%majorversion
|
|
|
|
cat "$binary"-%majorversion.lang >>"$lstfile"
|
|
|
|
done
|
2019-08-01 17:37:17 +00:00
|
|
|
}
|
|
|
|
|
2020-07-28 13:44:01 +00:00
|
|
|
find_lang_bins %name.lst libpq5
|
|
|
|
find_lang_bins %name-devel.lst pg_config
|
2019-08-01 17:37:17 +00:00
|
|
|
|
|
|
|
|
2020-07-28 13:44:01 +00:00
|
|
|
%files -f %name.lst
|
2019-08-01 17:37:17 +00:00
|
|
|
%license COPYRIGHT
|
|
|
|
%_libdir/libpq.so.*
|
|
|
|
%dir %_datadir/pgsql
|
|
|
|
%doc %_datadir/pgsql/pg_service.conf.sample
|
|
|
|
|
|
|
|
|
2020-07-28 13:44:01 +00:00
|
|
|
%files devel -f %name-devel.lst
|
2019-08-01 17:37:17 +00:00
|
|
|
%_bindir/pg_config
|
|
|
|
%_includedir/*
|
|
|
|
%_libdir/libpq.so
|
|
|
|
%_libdir/pkgconfig/libpq.pc
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2020-07-28 13:44:01 +00:00
|
|
|
* Tue Nov 19 2019 Patrik Novotný <panovotn@redhat.com> - 12.1-3
|
|
|
|
- Rebuild with rebased symbol versioning patch
|
|
|
|
|
|
|
|
* Fri Nov 15 2019 Patrik Novotný <panovotn@redhat.com> - 12.1-2
|
|
|
|
- Rebuild with rebased symbol versioning patch
|
|
|
|
|
|
|
|
* Tue Nov 12 2019 Patrik Novotný <panovotn@redhat.com> - 12.1-1
|
|
|
|
- Rebase to upstream release 12.1
|
|
|
|
|
|
|
|
* Fri Nov 08 2019 Honza Horak <hhorak@redhat.com> - 12.0-2
|
|
|
|
- Bump release for a new build with gating.yaml added
|
|
|
|
Related: #1749461
|
|
|
|
|
|
|
|
* Thu Oct 03 2019 Patrik Novotný <panovotn@redhat.com> - 12.0-1
|
|
|
|
- Initial release for upstream version 12.0
|
|
|
|
|
2019-08-01 17:37:17 +00:00
|
|
|
* Wed Aug 08 2018 Pavel Raiskup <praiskup@redhat.com> - 10.5-1
|
|
|
|
- update to 10.5 per release notes:
|
|
|
|
https://www.postgresql.org/docs/10/static/release-10-5.html
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Pavel Raiskup <praiskup@redhat.com> - 10.4-2
|
|
|
|
- ABI/symbol versioning
|
|
|
|
|
|
|
|
* Thu Jul 12 2018 Pavel Raiskup <praiskup@redhat.com> - 10.4-1
|
|
|
|
- rebase to the latest upstream release
|
|
|
|
|
|
|
|
* Fri Apr 13 2018 Pavel Raiskup <praiskup@redhat.com> - 10.3-1
|
|
|
|
- initial release, packaging inspired by postgresql.spec
|
|
|
|
- provide postgresql-devel to avoid fixing all the client packages
|