blob: 87b939a45d42d31c989d8c146c42dd04a9a27995 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
--- 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 <hhorak@redhat.com> 08.04.0200-2
+- Enable building in scl
+
* Mon Mar 15 2010 Tom Lane <tgl@redhat.com> 08.04.0200-1
- Update to version 08.04.0200
Resolves: #568900
|