Blame SPECS/libecpg.spec

4faa0f
%global majorversion 13
4faa0f
4faa0f
Summary: ECPG - Embedded SQL in C
4faa0f
Name: libecpg
4faa0f
Version: %majorversion.5
4faa0f
Release: 1%{?dist}
4faa0f
4faa0f
License: PostgreSQL
4faa0f
Url: http://www.postgresql.org/
4faa0f
4faa0f
Source0: https://ftp.postgresql.org/pub/source/v%version/postgresql-%version.tar.bz2
4faa0f
Source1: https://ftp.postgresql.org/pub/source/v%version/postgresql-%version.tar.bz2.sha256
4faa0f
4faa0f
4faa0f
# Comments for these patches are in the patch files.
4faa0f
Patch1: libecpg-10.5-rpm-pgsql.patch
4faa0f
Patch2: libecpg-10.5-var-run-socket.patch
4faa0f
Patch3: libecpg-12.2-external-libpq.patch
4faa0f
Patch4: libecpg-10.5-no-compat-lib.patch
4faa0f
Patch5: libecpg-12.2-dependency-build.patch
4faa0f
4faa0f
BuildRequires: gcc
4faa0f
BuildRequires: glibc-devel bison flex gawk
4faa0f
BuildRequires: zlib-devel
4faa0f
BuildRequires: openssl-devel
4faa0f
BuildRequires: krb5-devel
4faa0f
BuildRequires: openldap-devel
4faa0f
BuildRequires: libpq-devel
4faa0f
BuildRequires: gettext
4faa0f
BuildRequires: multilib-rpm-config
4faa0f
BuildRequires: make
4faa0f
4faa0f
Requires: libpgtypes = %{version}-%{release}
4faa0f
4faa0f
%description
4faa0f
An embedded SQL program consists of code written in an ordinary programming
4faa0f
language, in this case C, mixed with SQL commands in specially marked sections.
4faa0f
To build the program, the source code (*.pgc) is first passed through the
4faa0f
embedded SQL preprocessor, which converts it to an ordinary C program (*.c), and
4faa0f
afterwards it can be processed by a C compiler.
4faa0f
4faa0f
4faa0f
%package devel
4faa0f
Summary: Development files for ECPG - Embedded SQL in C
4faa0f
Requires: %name%{?_isa} = %version-%release
4faa0f
Requires: libpgtypes%{?_isa} = %version-%release
4faa0f
4faa0f
%description devel
4faa0f
ECPG development files.  You will need to install this package to build any
4faa0f
package or any clients that use the ECPG to connect to a PostgreSQL server.
4faa0f
4faa0f
4faa0f
%package -n libpgtypes
4faa0f
Summary: Map PostgreSQL database types to C equivalents
4faa0f
4faa0f
%description -n libpgtypes
4faa0f
The pgtypes library maps PostgreSQL database types to C equivalents that can be
4faa0f
used in C programs. It also offers functions to do basic calculations with those
4faa0f
types within C, i.e., without the help of the PostgreSQL server.
4faa0f
4faa0f
4faa0f
%prep
4faa0f
( cd "$(dirname "%SOURCE1")" ; sha256sum -c "%SOURCE1" )
4faa0f
%autosetup -n postgresql-%version -p1
4faa0f
4faa0f
# remove .gitignore files to ensure none get into the RPMs (bug #642210)
4faa0f
find . -type f -name .gitignore | xargs rm
4faa0f
4faa0f
4faa0f
%build
4faa0f
# We don't build server nor client (e.g. /bin/psql) binaries in this package, so
4faa0f
# we can disable some configure options.
4faa0f
%configure \
4faa0f
    --disable-rpath \
4faa0f
    --with-ldap \
4faa0f
    --with-openssl \
4faa0f
    --with-gssapi \
4faa0f
    --enable-nls \
4faa0f
    --without-readline \
4faa0f
    --datadir=%_datadir/pgsql
4faa0f
4faa0f
%make_build -C "src/interfaces/ecpg" -j1
4faa0f
4faa0f
4faa0f
%install
4faa0f
%make_install -C "src/interfaces/ecpg" -j1
4faa0f
4faa0f
# remove files not to be packaged
4faa0f
find $RPM_BUILD_ROOT -name '*.a' -delete
4faa0f
4faa0f
%multilib_fix_c_header --file "%{_includedir}/ecpg_config.h"
4faa0f
4faa0f
# function from postgresql.spec
4faa0f
find_lang_bins ()
4faa0f
{
4faa0f
    lstfile=$1 ; shift
4faa0f
    cp /dev/null "$lstfile"
4faa0f
    for binary; do
4faa0f
        %find_lang "$binary"-%majorversion
4faa0f
        cat "$binary"-%majorversion.lang >>"$lstfile"
4faa0f
    done
4faa0f
}
4faa0f
4faa0f
find_lang_bins %name.lst        ecpglib6
4faa0f
find_lang_bins %name-devel.lst  ecpg
4faa0f
4faa0f
4faa0f
%files -f %name.lst
4faa0f
%license COPYRIGHT
4faa0f
%_libdir/libecpg.so.6*
4faa0f
4faa0f
4faa0f
%files -n libpgtypes
4faa0f
%license COPYRIGHT
4faa0f
%_libdir/libpgtypes.so.3*
4faa0f
4faa0f
4faa0f
%files devel -f %name-devel.lst
4faa0f
%_bindir/ecpg
4faa0f
%_libdir/libecpg.so
4faa0f
%_libdir/libpgtypes.so
4faa0f
%_libdir/pkgconfig/libecpg.pc
4faa0f
%_libdir/pkgconfig/libpgtypes.pc
4faa0f
%_includedir/ecpg*.h
4faa0f
%_includedir/pgsql/informix
4faa0f
%_includedir/pgtypes*.h
4faa0f
%_includedir/sql3types.h
4faa0f
%_includedir/sqlca.h
4faa0f
%_includedir/sqlda*.h
4faa0f
4faa0f
4faa0f
%changelog
4faa0f
* Mon Nov 15 2021 Marek Kulik <mkulik@redhat.com> - 13.5-1
4faa0f
- Rebase to upstream release 13.5
4faa0f
4faa0f
* Fri Aug 20 2021 Filip Januš <fjanus@redhat.com> - 13.1-11
4faa0f
- Add -j1 also into build section
4faa0f
- Resolves: #1975438
4faa0f
4faa0f
* Thu Aug 05 2021 Filip Januš <fjanus@redhat.com> - 13.1-10
4faa0f
- Disable parallel build
4faa0f
- Resolves: #1975438
4faa0f
4faa0f
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 13.1-9
4faa0f
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
4faa0f
  Related: rhbz#1991688
4faa0f
4faa0f
* Wed Jul 28 2021 Filip Januš <fjanus@redhat.com> - 13.1-8
4faa0f
- Fix gating.yaml and rebuild
4faa0f
4faa0f
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 13.1-7
4faa0f
- Rebuilt for RHEL 9 BETA for openssl 3.0
4faa0f
  Related: rhbz#1971065
4faa0f
4faa0f
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 13.1-6
4faa0f
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
4faa0f
4faa0f
* Mon Feb 08 2021 Pavel Raiskup <praiskup@redhat.com> - 13.1-5
4faa0f
- rebuild for libpq ABI fix rhbz#1908268
4faa0f
4faa0f
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 13.1-4
4faa0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
4faa0f
4faa0f
* Thu Dec 03 2020 Honza Horak <hhorak@redhat.com> - 13.1-3
4faa0f
- Add Requires: libpgtypes to avoid the need to test interoperability
4faa0f
  between the various combinations of old and new subpackages
4faa0f
4faa0f
* Wed Nov 18 2020 Honza Horak <hhorak@redhat.com> - 13.1-1
4faa0f
- Rebase to upstream release 13.0
4faa0f
4faa0f
* Fri Oct 23 2020 Honza Horak <hhorak@redhat.com> - 13.0-1
4faa0f
- Rebase to upstream release 13.0
4faa0f
4faa0f
* Tue Aug 25 2020 Patrik Novotný <panovotn@redhat.com> - 12.4-1
4faa0f
- Rebase to upstream release 12.4
4faa0f
4faa0f
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 12.3-2
4faa0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
4faa0f
4faa0f
* Mon May 18 2020 Patrik Novotný <panovotn@redhat.com> - 12.3-1
4faa0f
- Rebase to upstream release 12.3
4faa0f
4faa0f
* Mon Mar 2 2020 Filip Januš <fjanus@redhat.com> - 12.2-1
4faa0f
- Rebase onto: 12.2
4faa0f
- update of patch(libecpg-10.5-external-libpq.patch) was needed
4faa0f
- add upstream patch libecpg-12.2-dependency-build.patch
4faa0f
  https://www.postgresql.org/message-id/20200321221303.GA17979%40momjian.us 
4faa0f
4faa0f
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 11.2-3
4faa0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4faa0f
4faa0f
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11.2-2
4faa0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
4faa0f
4faa0f
* Thu Feb 14 2019 Pavel Raiskup <praiskup@redhat.com> - 11.2-1
4faa0f
- latest upstream release, per release notes:
4faa0f
  https://www.postgresql.org/docs/11/static/release-11-1.html
4faa0f
  https://www.postgresql.org/docs/11/static/release-11-2.html
4faa0f
4faa0f
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11.0-2
4faa0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
4faa0f
4faa0f
* Wed Oct 17 2018 Pavel Raiskup <praiskup@redhat.com> - 11.0-1
4faa0f
- latest upstream release, per release notes:
4faa0f
  https://www.postgresql.org/docs/11/static/release-11.html
4faa0f
4faa0f
* Thu Aug 30 2018 Pavel Raiskup <praiskup@redhat.com> - 10.5-1
4faa0f
- slight simplification before review
4faa0f
4faa0f
* Thu Aug 16 2018 Pavel Raiskup <praiskup@redhat.com> - 10.5-0.1
4faa0f
- initial packaging