--- postgresql-odbc.spec.nodsc 2010-03-15 17:01:43.000000000 +0100 +++ postgresql-odbc.spec 2011-12-06 15:46:52.131950657 +0100 @@ -1,7 +1,14 @@ -Name: postgresql-odbc +# Sets %%pkg_name to 'postgresql-odbc' if we build for scl. +%{?scl:%scl_package postgresql-odbc} +# If we don't build for scl, then pkg_name is empty. +# This way, we can always use %%pkg_name for 'postgresql-odbc', be it scl build or not. +%{!?scl:%global pkg_name postgresql-odbc} +# %%{name} then references to either 'postgresql-odbc' (not in scl) or '%%{?scl:%scl_prefix}postgresql-odbc' (in scl). + +Name: %{?scl_prefix}postgresql-odbc Summary: PostgreSQL ODBC driver Version: 08.04.0200 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: Applications/Databases URL: http://psqlodbc.projects.postgresql.org/ @@ -22,7 +29,7 @@ Source0: psqlodbc-%{version}.tar.gz Source1: acinclude.m4 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: unixODBC-devel +BuildRequires: %{?scl:%scl_prefix}unixODBC-devel BuildRequires: libtool automake autoconf postgresql-devel BuildRequires: openssl-devel krb5-devel pam-devel zlib-devel readline-devel @@ -52,7 +59,10 @@ autoheader %build +echo %scl +%{?scl:scl enable %scl - << \EOF} %configure --with-unixodbc --disable-dependency-tracking +%{?scl:EOF} make @@ -81,6 +91,9 @@ rm -rf $RPM_BUILD_ROOT %doc license.txt readme.txt docs/* %changelog +* Tue Dec 06 2011 Honza Horak 08.04.0200-2 +- Enable building in scl + * Mon Mar 15 2010 Tom Lane 08.04.0200-1 - Update to version 08.04.0200 Resolves: #568900