Blame libecpg.spec

a437480
%global majorversion 11
4f5a423
4f5a423
Summary: ECPG - Embedded SQL in C
4f5a423
Name: libecpg
3255121
Version: %majorversion.2
89d6ceb
Release: 3%{?dist}
4f5a423
4f5a423
License: PostgreSQL
4f5a423
Url: http://www.postgresql.org/
4f5a423
4f5a423
Source0: https://ftp.postgresql.org/pub/source/v%version/postgresql-%version.tar.bz2
4f5a423
Source1: https://ftp.postgresql.org/pub/source/v%version/postgresql-%version.tar.bz2.sha256
4f5a423
4f5a423
4f5a423
# Comments for these patches are in the patch files.
4f5a423
Patch1: libecpg-10.5-rpm-pgsql.patch
4f5a423
Patch2: libecpg-10.5-var-run-socket.patch
4f5a423
Patch3: libecpg-10.5-external-libpq.patch
4f5a423
Patch4: libecpg-10.5-no-compat-lib.patch
4f5a423
4f5a423
BuildRequires: gcc
4f5a423
BuildRequires: glibc-devel bison flex gawk
4f5a423
BuildRequires: zlib-devel
4f5a423
BuildRequires: openssl-devel
4f5a423
BuildRequires: krb5-devel
4f5a423
BuildRequires: openldap-devel
4f5a423
BuildRequires: libpq-devel
4f5a423
BuildRequires: gettext
4f5a423
BuildRequires: multilib-rpm-config
4f5a423
4f5a423
%description
4f5a423
An embedded SQL program consists of code written in an ordinary programming
4f5a423
language, in this case C, mixed with SQL commands in specially marked sections.
4f5a423
To build the program, the source code (*.pgc) is first passed through the
4f5a423
embedded SQL preprocessor, which converts it to an ordinary C program (*.c), and
4f5a423
afterwards it can be processed by a C compiler.
4f5a423
4f5a423
4f5a423
%package devel
4f5a423
Summary: Development files for ECPG - Embedded SQL in C
4f5a423
Requires: %name%{?_isa} = %version-%release
4f5a423
Requires: libpgtypes%{?_isa} = %version-%release
4f5a423
4f5a423
%description devel
4f5a423
ECPG development files.  You will need to install this package to build any
4f5a423
package or any clients that use the ECPG to connect to a PostgreSQL server.
4f5a423
4f5a423
4f5a423
%package -n libpgtypes
4f5a423
Summary: Map PostgreSQL database types to C equivalents
4f5a423
4f5a423
%description -n libpgtypes
4f5a423
The pgtypes library maps PostgreSQL database types to C equivalents that can be
4f5a423
used in C programs. It also offers functions to do basic calculations with those
4f5a423
types within C, i.e., without the help of the PostgreSQL server.
4f5a423
4f5a423
4f5a423
%prep
4f5a423
( cd "$(dirname "%SOURCE1")" ; sha256sum -c "%SOURCE1" )
4f5a423
%autosetup -n postgresql-%version -p1
4f5a423
4f5a423
# remove .gitignore files to ensure none get into the RPMs (bug #642210)
4f5a423
find . -type f -name .gitignore | xargs rm
4f5a423
4f5a423
4f5a423
%build
4f5a423
# We don't build server nor client (e.g. /bin/psql) binaries in this package, so
4f5a423
# we can disable some configure options.
4f5a423
%configure \
4f5a423
    --disable-rpath \
4f5a423
    --with-ldap \
4f5a423
    --with-openssl \
4f5a423
    --with-gssapi \
4f5a423
    --enable-nls \
4f5a423
    --without-readline \
4f5a423
    --datadir=%_datadir/pgsql
4f5a423
4f5a423
%make_build -C "src/interfaces/ecpg"
4f5a423
4f5a423
4f5a423
%install
4f5a423
%make_install -C "src/interfaces/ecpg"
4f5a423
4f5a423
# remove files not to be packaged
4f5a423
find $RPM_BUILD_ROOT -name '*.a' -delete
4f5a423
4f5a423
%multilib_fix_c_header --file "%{_includedir}/ecpg_config.h"
4f5a423
4f5a423
# function from postgresql.spec
4f5a423
find_lang_bins ()
4f5a423
{
4f5a423
    lstfile=$1 ; shift
4f5a423
    cp /dev/null "$lstfile"
4f5a423
    for binary; do
4f5a423
        %find_lang "$binary"-%majorversion
4f5a423
        cat "$binary"-%majorversion.lang >>"$lstfile"
4f5a423
    done
4f5a423
}
4f5a423
4f5a423
find_lang_bins %name.lst        ecpglib6
4f5a423
find_lang_bins %name-devel.lst  ecpg
4f5a423
4f5a423
4f5a423
%files -f %name.lst
4f5a423
%license COPYRIGHT
4f5a423
%_libdir/libecpg.so.6*
4f5a423
4f5a423
4f5a423
%files -n libpgtypes
4f5a423
%license COPYRIGHT
4f5a423
%_libdir/libpgtypes.so.3*
4f5a423
4f5a423
4f5a423
%files devel -f %name-devel.lst
4f5a423
%_bindir/ecpg
4f5a423
%_libdir/libecpg.so
4f5a423
%_libdir/libpgtypes.so
4f5a423
%_libdir/pkgconfig/libecpg.pc
4f5a423
%_libdir/pkgconfig/libpgtypes.pc
4f5a423
%_includedir/ecpg*.h
4f5a423
%_includedir/pgsql/informix
4f5a423
%_includedir/pgtypes*.h
4f5a423
%_includedir/sql3types.h
4f5a423
%_includedir/sqlca.h
4f5a423
%_includedir/sqlda*.h
4f5a423
4f5a423
4f5a423
%changelog
89d6ceb
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 11.2-3
89d6ceb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
89d6ceb
13753df
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11.2-2
13753df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
13753df
3255121
* Thu Feb 14 2019 Pavel Raiskup <praiskup@redhat.com> - 11.2-1
3255121
- latest upstream release, per release notes:
3255121
  https://www.postgresql.org/docs/11/static/release-11-1.html
3255121
  https://www.postgresql.org/docs/11/static/release-11-2.html
3255121
78a81c1
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11.0-2
78a81c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
78a81c1
a437480
* Wed Oct 17 2018 Pavel Raiskup <praiskup@redhat.com> - 11.0-1
a437480
- latest upstream release, per release notes:
3255121
  https://www.postgresql.org/docs/11/static/release-11.html
a437480
4f5a423
* Thu Aug 30 2018 Pavel Raiskup <praiskup@redhat.com> - 10.5-1
4f5a423
- slight simplification before review
4f5a423
4f5a423
* Thu Aug 16 2018 Pavel Raiskup <praiskup@redhat.com> - 10.5-0.1
4f5a423
- initial packaging