Blame SPECS/libecpg.spec

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