Blame SPECS/libecpg.spec

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