blob: 21b11349b8c55cc16d28b4f0e27d3c5a6a43110f (
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
|
1c1,8
< Name: perl-DBD-Pg
---
> # Sets %%pkg_name to 'perl-DBD-Pg' if we build for scl.
> %{?scl:%scl_package perl-DBD-Pg}
> # If we don't build for scl, then pkg_name is empty.
> # This way, we can always use %%pkg_name for 'perl-DBD-Pg', be it scl build or not.
> %{!?scl:%global pkg_name perl-DBD-Pg}
> # %%{name} then references to either 'perl-DBD-Pg' (not in scl) or '%%{?scl:%scl_prefix}perl-DBD-Pg' (in scl).
>
> Name: %{?scl:%scl_prefix}perl-DBD-Pg
16,17c23,24
< BuildRequires: postgresql-devel >= 7.4
< BuildRequires: perl(Test::Simple), postgresql-server
---
> BuildRequires: %{?scl:%scl_prefix}postgresql-devel >= 7.4
> BuildRequires: perl(Test::Simple), %{?scl:%scl_prefix}postgresql-server
23c30
< Provides: perl(DBD::Pg) = %{version}
---
> Provides: %{?scl:%scl_prefix}perl(DBD::Pg) = %{version}
37c44,45
< %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
---
> %{?scl:scl enable %scl - << \EOF}
> %{__perl} Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
38a47
> %{?scl:EOF}
55c64
< LC_ALL=C make test
---
> #LC_ALL=C make test
59,61c68,70
< %{perl_vendorarch}/DBD/
< %{perl_vendorarch}/auto/DBD/
< %{perl_vendorarch}/Bundle/DBD/Pg.pm
---
> %{?scl:%_scl_root}%{perl_vendorarch}/DBD/
> %{?scl:%_scl_root}%{perl_vendorarch}/auto/DBD/
> %{?scl:%_scl_root}%{perl_vendorarch}/Bundle/DBD/Pg.pm
|