summaryrefslogtreecommitdiffstats
path: root/postgresql92/rubygem-pg.spec.diff
blob: 50173e08216b15db9cd15b6d02c0eee00240e40e (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
--- rubygem-pg.spec.nodsc	2012-08-20 15:36:33.558327113 +0200
+++ rubygem-pg.spec	2012-08-20 15:45:47.794358583 +0200
@@ -1,9 +1,12 @@
+%{?scl:%scl_package rubygem-%{gem_name}}
+%{!?scl:%global pkg_name %{name}}
+
 # Generated from pg-0.11.0.gem by gem2rpm -*- rpm-spec -*-
 %global gem_name pg
 %global rubyabi 1.9.1
 
 Summary: A Ruby interface to the PostgreSQL RDBMS
-Name: rubygem-%{gem_name}
+Name: %{?scl_prefix}rubygem-%{gem_name}
 Version: 0.12.2
 Release: 3%{?dist}
 Group: Development/Languages
@@ -22,12 +25,12 @@ BuildRequires: ruby(abi) = %{rubyabi}
 BuildRequires: ruby-devel
 BuildRequires: rubygems-devel
 BuildRequires: ruby
-BuildRequires: postgresql-server postgresql-devel
+BuildRequires: %{?scl_prefix}postgresql-server %{?scl_prefix}postgresql-devel
 # Keep requiring rspec-core as long as rubygem(rspec) is provided by RSpec 1.x
 BuildRequires: rubygem(rspec-core)
 # Introduced in F17.
-Obsoletes: ruby(postgres) <= 0.7.9-2010.01.28.2
-Provides: rubygem(%{gem_name}) = %{version}
+Obsoletes: %{?scl_prefix}ruby(postgres) <= 0.7.9-2010.01.28.2
+Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
 
 %description
 This is the extension library to access a PostgreSQL database from Ruby.
@@ -35,21 +38,23 @@ This library works with PostgreSQL 7.4 a
 
 
 %package doc
-Summary: Documentation for %{name}
+Summary: Documentation for %{pkg_name}
 Group: Documentation
-Requires: %{name} = %{version}-%{release}
+Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
 BuildArch: noarch
 
 %description doc
-Documentation for %{name}
+Documentation for %{pkg_name}
 
 
 %prep
-%setup -q -c -T
+%setup -n %{pkg_name}-%{version} -q -c -T
 mkdir -p .%{gem_dir}
 export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
+%{?scl:scl enable %{scl} "}
 gem install --local --install-dir .%{gem_dir} \
             -V --force %{SOURCE0}
+%{?scl:"}
 
 %build
 
@@ -78,7 +83,9 @@ done
 
 %check
 pushd .%{gem_instdir}
+%{?scl:scl enable %{scl} "}
 rspec spec
+%{?scl:"}
 popd
 
 %files
@@ -108,7 +115,6 @@ popd
 %{gem_instdir}/sample
 %{gem_instdir}/spec
 
-
 %changelog
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.2-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild