Blame SPECS/libpq.spec

ad7aa5
%global majorversion 13
ad7aa5
%global obsoletes_version %( echo $(( %majorversion + 1 )) )
ad7aa5
ad7aa5
Summary: PostgreSQL client library
ad7aa5
Name: libpq
ad7aa5
Version: %{majorversion}.5
ad7aa5
Release: 1%{?dist}
ad7aa5
ad7aa5
License: PostgreSQL
ad7aa5
Url: http://www.postgresql.org/
ad7aa5
ad7aa5
Source0: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
ad7aa5
Source1: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2.sha256
ad7aa5
ad7aa5
ad7aa5
# Comments for these patches are in the patch files.
ad7aa5
Patch1: libpq-10.3-rpm-pgsql.patch
ad7aa5
Patch2: libpq-10.3-var-run-socket.patch
ad7aa5
Patch3: libpq-12.1-symbol-versioning.patch
ad7aa5
ad7aa5
BuildRequires: gcc
ad7aa5
BuildRequires: glibc-devel bison flex gawk
ad7aa5
BuildRequires: zlib-devel
ad7aa5
BuildRequires: openssl-devel
ad7aa5
BuildRequires: krb5-devel
ad7aa5
BuildRequires: openldap-devel
ad7aa5
BuildRequires: gettext
ad7aa5
BuildRequires: multilib-rpm-config
ad7aa5
BuildRequires: make
ad7aa5
ad7aa5
Obsoletes: postgresql-libs < %obsoletes_version
ad7aa5
Provides: postgresql-libs = %version-%release
ad7aa5
ad7aa5
ad7aa5
%description
ad7aa5
The libpq package provides the essential shared library for any PostgreSQL
ad7aa5
client program or interface.  You will need to install this package to use any
ad7aa5
other PostgreSQL package or any clients that need to connect to a PostgreSQL
ad7aa5
server.
ad7aa5
ad7aa5
ad7aa5
%package devel
ad7aa5
Summary: Development files for building PostgreSQL client tools
ad7aa5
Requires: %name%{?_isa} = %version-%release
ad7aa5
# Historically we had 'postgresql-devel' package which was used for building
ad7aa5
# both PG clients and PG server modules;  let's have this fake provide to cover
ad7aa5
# most of the depending packages and the rest (those which want to build server
ad7aa5
# modules) need to be fixed to require postgresql-server-devel package.
ad7aa5
Provides: postgresql-devel = %version-%release
ad7aa5
Obsoletes: postgresql-devel < %obsoletes_version
ad7aa5
ad7aa5
%description devel
ad7aa5
The libpq package provides the essential shared library for any PostgreSQL
ad7aa5
client program or interface.  You will need to install this package to build any
ad7aa5
package or any clients that need to connect to a PostgreSQL server.
ad7aa5
ad7aa5
ad7aa5
%prep
ad7aa5
( cd "$(dirname "%SOURCE1")" ; sha256sum -c "%SOURCE1" )
ad7aa5
%autosetup -n postgresql-%version -p1
ad7aa5
ad7aa5
# remove .gitignore files to ensure none get into the RPMs (bug #642210)
ad7aa5
find . -type f -name .gitignore | xargs rm
ad7aa5
ad7aa5
ad7aa5
%build
ad7aa5
# complements symbol-versioning patch
ad7aa5
export SYMBOL_VERSION_PREFIX=RHPG_
ad7aa5
ad7aa5
# We don't build server nor client (e.g. /bin/psql) binaries in this package, so
ad7aa5
# we can disable some configure options.
ad7aa5
%configure \
ad7aa5
    --disable-rpath \
ad7aa5
    --with-ldap \
ad7aa5
    --with-openssl \
ad7aa5
    --with-gssapi \
ad7aa5
    --enable-nls \
ad7aa5
    --without-readline \
ad7aa5
    --datadir=%_datadir/pgsql
ad7aa5
ad7aa5
%global build_subdirs \\\
ad7aa5
        src/include \\\
ad7aa5
        src/common \\\
ad7aa5
        src/port \\\
ad7aa5
        src/interfaces/libpq \\\
ad7aa5
        src/bin/pg_config
ad7aa5
ad7aa5
for subdir in %build_subdirs; do
ad7aa5
    %make_build -C "$subdir"
ad7aa5
done
ad7aa5
ad7aa5
ad7aa5
%install
ad7aa5
for subdir in %build_subdirs; do
ad7aa5
    %make_install -C "$subdir"
ad7aa5
done
ad7aa5
ad7aa5
# remove files not to be packaged
ad7aa5
find $RPM_BUILD_ROOT -name '*.a' -delete
ad7aa5
rm -r $RPM_BUILD_ROOT%_includedir/pgsql/server
ad7aa5
ad7aa5
%multilib_fix_c_header --file "%_includedir/pg_config.h"
ad7aa5
%multilib_fix_c_header --file "%_includedir/pg_config_ext.h"
ad7aa5
ad7aa5
find_lang_bins ()
ad7aa5
{
ad7aa5
    lstfile=$1 ; shift
ad7aa5
    cp /dev/null "$lstfile"
ad7aa5
    for binary; do
ad7aa5
        %find_lang "$binary"-%majorversion
ad7aa5
        cat "$binary"-%majorversion.lang >>"$lstfile"
ad7aa5
    done
ad7aa5
}
ad7aa5
ad7aa5
find_lang_bins %name.lst        libpq5
ad7aa5
find_lang_bins %name-devel.lst  pg_config
ad7aa5
ad7aa5
ad7aa5
%files -f %name.lst
ad7aa5
%license COPYRIGHT
ad7aa5
%_libdir/libpq.so.5*
ad7aa5
%dir %_datadir/pgsql
ad7aa5
%doc %_datadir/pgsql/pg_service.conf.sample
ad7aa5
ad7aa5
ad7aa5
%files devel -f %name-devel.lst
ad7aa5
%_bindir/pg_config
ad7aa5
%_includedir/*
ad7aa5
%_libdir/libpq.so
ad7aa5
%_libdir/pkgconfig/libpq.pc
ad7aa5
ad7aa5
ad7aa5
%changelog
ad7aa5
* Tue Nov 16 2021 Marek Kulik <mkulik@redhat.com> - 13.5-1
ad7aa5
- Update to 13.5
ad7aa5
ad7aa5
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 13.2-4
ad7aa5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
ad7aa5
  Related: rhbz#1991688
ad7aa5
ad7aa5
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 13.2-3
ad7aa5
- Rebuilt for RHEL 9 BETA for openssl 3.0
ad7aa5
  Related: rhbz#1971065
ad7aa5
ad7aa5
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 13.2-2
ad7aa5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
ad7aa5
ad7aa5
* Tue Feb 16 2021 Honza Horak <hhorak@redhat.com> - 13.2-1
ad7aa5
- Update to 13.2
ad7aa5
ad7aa5
* Mon Feb 08 2021 Patrik Novotný <panovotn@redhat.com> - 13.1-3
ad7aa5
- Fix symbol versioning
ad7aa5
ad7aa5
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 13.1-2
ad7aa5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
ad7aa5
ad7aa5
* Mon Nov 16 2020 Patrik Novotný <panovotn@redhat.com> - 13.1-1
ad7aa5
- Rebase to upstream release 13.1
ad7aa5
ad7aa5
* Mon Nov 02 2020 Patrik Novotný <panovotn@redhat.com> - 13.0-2
ad7aa5
- Rebuild for symbol versioning fix
ad7aa5
ad7aa5
* Wed Oct 14 2020 Patrik Novotný <panovotn@redhat.com> - 13.0-1
ad7aa5
- Rebase to upstream release 13.0
ad7aa5
ad7aa5
* Tue Aug 18 2020 Patrik Novotný <panovotn@redhat.com> - 12.4-1
ad7aa5
- Rebase to upstream release 12.4
ad7aa5
ad7aa5
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 12.3-2
ad7aa5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ad7aa5
ad7aa5
* Mon May 18 2020 Patrik Novotný <panovotn@redhat.com> - 12.3-1
ad7aa5
- Rebase to upstream release 12.3
ad7aa5
ad7aa5
* Mon Feb 17 2020 Patrik Novotný <panovotn@redhat.com> - 12.2-1
ad7aa5
- Rebase to upstream release 12.2
ad7aa5
ad7aa5
* Tue Feb 04 2020 Patrik Novotný <panovotn@redhat.com> - 12.1-1
ad7aa5
- Rebase to upstream release 12.1
ad7aa5
ad7aa5
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 11.6-2
ad7aa5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ad7aa5
ad7aa5
* Mon Nov 25 2019 Patrik Novotný <panovotn@redhat.com> - 11.6-1
ad7aa5
- Rebase to upstream version 11.6
ad7aa5
ad7aa5
* Wed Aug 07 2019 Petr Kubat <pkubat@redhat.com> - 11.5-1
ad7aa5
- New upstream version 11.5
ad7aa5
ad7aa5
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11.4-2
ad7aa5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ad7aa5
ad7aa5
* Tue Jul 09 2019 Petr Kubat <pkubat@redhat.com> - 11.4-1
ad7aa5
- New upstream version 11.4
ad7aa5
ad7aa5
* Fri May 10 2019 Pavel Raiskup <praiskup@redhat.com> - 11.3-2
ad7aa5
- obsolete anything < %%majorversion+1
ad7aa5
ad7aa5
* Thu May 09 2019 Patrik Novotný <panovotn@redhat.com> - 11.3-1
ad7aa5
- New upstream version 11.3
ad7aa5
ad7aa5
* Mon Feb 18 2019 Pavel Raiskup <praiskup@redhat.com> - 11.2-2
ad7aa5
- fix dnf system-upgrade from f29 to f29+, rhbz#1677849
ad7aa5
ad7aa5
* Thu Feb 14 2019 Pavel Raiskup <praiskup@redhat.com> - 11.2-1
ad7aa5
- latest upstream release, per release notes:
ad7aa5
  https://www.postgresql.org/docs/11/static/release-11-1.html
ad7aa5
  https://www.postgresql.org/docs/11/static/release-11-2.html
ad7aa5
ad7aa5
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11.0-2
ad7aa5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
ad7aa5
ad7aa5
* Tue Oct 16 2018 Pavel Raiskup <praiskup@redhat.com> - 11.0-1
ad7aa5
- latest upstream release, per release notes:
ad7aa5
  https://www.postgresql.org/docs/11/static/release-11-0.html
ad7aa5
ad7aa5
* Tue Sep 04 2018 Pavel Raiskup <praiskup@redhat.com> - 10.5-4
ad7aa5
- fix provides/obsoletes to final state
ad7aa5
ad7aa5
* Thu Aug 30 2018 Pavel Raiskup <praiskup@redhat.com> - 10.5-1
ad7aa5
- libpq packaging for Fedora