Blame SPECS/libpq.spec

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