4 |
|
%define perlversion %(perl -e 'printf "%%vd", $^V') |
5 |
|
%define perlarch %(perl -MConfig -e 'print $Config{archname}') |
6 |
|
%define downloadn DBD-Oracle |
7 |
+ |
%define closingbrace ) |
8 |
+ |
%define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo false;; esac) |
9 |
|
|
10 |
< |
%if "%{?online_release:set}" != "set" |
10 |
> |
%if "%online" != "true" |
11 |
|
Requires: p5-dbi oracle |
12 |
|
%define oraclesdksrc none |
13 |
|
%else |
14 |
|
# we still need oracle sdk makefiles: |
15 |
< |
%define oraclesdksrc http://cmsrep.cern.ch/cms/cpt/Software/download/cms/SOURCES/external/oracle/10.2.0.3-CMS18/instantclient-sdk-linux32-10.2.0.3-20061115.zip |
15 |
> |
%define oraclesdksrc http://cmsrep.cern.ch/cmssw/oracle-mirror/slc4_ia32/10.2.0.3/sdk.zip |
16 |
|
%endif |
17 |
|
|
18 |
|
Source0: http://mirror.switch.ch/ftp/mirror/CPAN/authors/id/P/PY/PYTHIAN/%downloadn-%{realversion}.tar.gz |
23 |
|
%prep |
24 |
|
%setup -T -b 0 -n %{downloadn}-%{realversion} |
25 |
|
|
26 |
< |
%if "%{?online_release:set}" == "set" |
26 |
> |
%if "%online" == "true" |
27 |
|
rm -rf instantclient_* |
28 |
< |
yes | unzip %_sourcedir/*-sdk-*linux32*.zip |
28 |
> |
yes | unzip %_sourcedir/sdk.zip |
29 |
|
%endif |
30 |
|
|
31 |
|
%build |
38 |
|
perl -p -i -e 's/NMEDIT = nmedit/NMEDIT = true/' Makefile.PL |
39 |
|
%endif |
40 |
|
|
41 |
< |
%if "%{?online_release:set}" != "set" |
41 |
> |
%if "%online" != "true" |
42 |
|
perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion -l -m $ORACLE_HOME/demo/demo.mk |
43 |
|
%else |
44 |
|
export ORACLE_HOME="/opt/xdaq" |