Blame SPECS/libpq.spec

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