Blame SPECS/libecpg.spec

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