]>
Commit | Line | Data |
---|---|---|
8ef2b0d1 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with lite # build basic lite version of client | |
4 | ||
091300ab | 5 | %define otnurl http://download.oracle.com/otn/linux/instantclient/121010 |
8ef2b0d1 JR |
6 | Summary: Oracle Database Instant Client |
7 | Name: oracle-instantclient | |
091300ab ER |
8 | Version: 12.1.0.1.0 |
9 | Release: 0.1 | |
8ef2b0d1 JR |
10 | License: OTN (proprietary, non-distributable) |
11 | Group: Applications/Databases | |
091300ab ER |
12 | %ifarch %{ix86} |
13 | Source0: %{otnurl}/instantclient-basic-linux-%{version}.zip | |
14 | # NoSource0-md5: 7c3b522424713cc8d3814356cf092c02 | |
15 | Source1: %{otnurl}/instantclient-basiclite-linux-%{version}.zip | |
16 | # NoSource1-md5: 0d5ec661d9ebfde8880cff5ca1ef9553 | |
17 | Source2: %{otnurl}/instantclient-sdk-linux-%{version}.zip | |
18 | # NoSource2-md5: e33beaaf88256e19f8c59e07d7033159 | |
19 | Source3: %{otnurl}/instantclient-jdbc-linux-%{version}.zip | |
20 | # NoSource3-md5: be0c52004e52448726fb7a4e891c7c98 | |
21 | Source4: %{otnurl}/instantclient-odbc-linux-%{version}.zip | |
22 | # NoSource4-md5: e8ba53efe62b6f3f139a30c55baf78b5 | |
23 | Source5: %{otnurl}/instantclient-sqlplus-linux-%{version}.zip | |
24 | # NoSource5-md5: c3c5bfefce74974f98fd8e72fb2cd44f | |
25 | Source6: %{otnurl}/instantclient-tools-linux-%{version}.zip | |
26 | # NoSource6-md5: 902c817154b5568b2db8c7328d4a10d7 | |
27 | Source7: %{otnurl}/instantclient-precomp-linux-%{version}.zip | |
28 | # NoSource7-md5: 4e99435623d82b802d4d95de3598dde7 | |
8ef2b0d1 JR |
29 | NoSource: 0 |
30 | NoSource: 1 | |
31 | NoSource: 2 | |
32 | NoSource: 3 | |
33 | NoSource: 4 | |
34 | NoSource: 5 | |
35 | NoSource: 6 | |
b06df208 | 36 | NoSource: 7 |
091300ab ER |
37 | %endif |
38 | %ifarch %{x8664} | |
39 | Source10: %{otnurl}/instantclient-basic-linux.x64-%{version}.zip | |
40 | # NoSource10-md5: a555a7f4510e6568e66c45238929f16b | |
41 | Source11: %{otnurl}/instantclient-basiclite-linux.x64-%{version}.zip | |
42 | # NoSource11-md5: 6c712aafb26989699d57c99a3e2bc124 | |
43 | Source12: %{otnurl}/instantclient-sdk-linux.x64-%{version}.zip | |
44 | # NoSource12-md5: e8682f754ea63b9c5f17bd22ba158a75 | |
45 | Source13: %{otnurl}/instantclient-jdbc-linux.x64-%{version}.zip | |
46 | # NoSource13-md5: 7b0c4111c6c4a7db062ae961dbc309b6 | |
47 | Source14: %{otnurl}/instantclient-odbc-linux.x64-%{version}.zip | |
48 | # NoSource14-md5: b0e9e3b10ba22b34dbe335426a4fe001 | |
49 | Source15: %{otnurl}/instantclient-sqlplus-linux.x64-%{version}.zip | |
50 | # NoSource15-md5: 09d2463277bdbddba36aafc051c5c1b5 | |
51 | Source16: %{otnurl}/instantclient-tools-linux.x64-%{version}.zip | |
52 | # NoSource16-md5: 95f2a981ee6515fe31652fb41f7eacbf | |
53 | Source17: %{otnurl}/instantclient-precomp-linux.x64-%{version}.zip | |
54 | # NoSource17-md5: 8ac59bdbb1cb34796c753bdad65e72d9 | |
8ef2b0d1 JR |
55 | NoSource: 10 |
56 | NoSource: 11 | |
57 | NoSource: 12 | |
58 | NoSource: 13 | |
59 | NoSource: 14 | |
60 | NoSource: 15 | |
61 | NoSource: 16 | |
b06df208 | 62 | NoSource: 17 |
091300ab ER |
63 | %endif |
64 | # http://duberga.net/dbd_oracle_instantclient_linux/oracle-instantclient-config | |
65 | Source20: oracle-instantclient-config.in | |
66 | Source21: oracle-instantclient.pc.in | |
89420c84 ER |
67 | Patch0: proc-includes32.patch |
68 | Patch1: proc-includes64.patch | |
b06df208 | 69 | URL: http://www.oracle.com/technetwork/database/features/instant-client/ |
8ef2b0d1 JR |
70 | BuildRequires: sed |
71 | BuildRequires: unzip | |
72 | ExclusiveArch: %{ix86} %{x8664} | |
73 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
74 | ||
091300ab ER |
75 | %define driver_ver %(echo %{version} | cut -d. -f1) |
76 | %define soname %(echo %{version} | cut -d. -f1,2) | |
77 | ||
78 | # verify these with odbc_update_ini.sh | |
79 | %define driver_name "Oracle %{driver_ver}c ODBC driver" | |
80 | %define driver_desc "Oracle ODBC driver for Oracle %{driver_ver}c" | |
81 | ||
b06df208 JR |
82 | %define _gcc_sys_inc_dir %(gcc -print-file-name=include) |
83 | ||
091300ab ER |
84 | # libocci.so - should be linked against libclntsh.so but is not |
85 | %define skip_post_check_so libclntsh.so.%{soname} libclntshcore.so.%{soname} libocci.so.%{soname} libsqora.so.%{soname} | |
86 | ||
b06df208 JR |
87 | # don't generate deps for Intel Cobol Compiler |
88 | %define _noautoreq ^libcob.*.so | |
89 | ||
8ef2b0d1 JR |
90 | %description |
91 | Orcale Database Instant Client Package. | |
92 | ||
93 | %package basic | |
94 | Summary: Oracle Database Instant Client - Basic | |
95 | Group: Applications/Databases | |
96 | Provides: %{name} = %{version}-%{release} | |
97 | ||
98 | %description basic | |
99 | Orcale Database Instant Client Package - Basic. | |
100 | All files required to run OCI, and OCCI, and JDBC-OCI applications. | |
101 | ||
102 | %package basiclite | |
103 | Summary: Oracle Database Instant Client - Basic Lite | |
104 | Group: Applications/Databases | |
105 | Provides: %{name} = %{version}-%{release} | |
106 | ||
107 | %description basiclite | |
108 | Orcale Database Instant Client Package - Basic Lite. | |
109 | All files required to run OCI, and OCCI, and JDBC-OCI applications. | |
110 | ||
111 | This package contains only English error messages and Unicode, ASCII, | |
112 | and Western European character set suppor | |
113 | ||
114 | %package devel | |
115 | Summary: SDK for Oracle Database Instant Client | |
116 | Group: Development/Libraries | |
117 | Requires: %{name} = %{version}-%{release} | |
118 | ||
119 | %description devel | |
120 | Oracle Database Instant Client Package - SDK. | |
121 | Additional header files and an example makefile for developing | |
122 | Oracle applications with Instant Client. | |
123 | ||
124 | %package jdbc | |
125 | Summary: JDBC for Oracle Database Instant Client | |
126 | Group: Libraries/Java | |
127 | Requires: %{name} = %{version}-%{release} | |
128 | ||
129 | %description jdbc | |
130 | Oracle Database Instant Client Package - JDBC. | |
131 | Support for JDBC-OCI, XA, Internationalization, and RowSet | |
132 | operations under JDBC. | |
133 | ||
134 | %package jdbc-devel | |
135 | Summary: JDBC for Oracle Database Instant Client development files | |
136 | Group: Development/Languages/Java | |
137 | Requires: %{name}-jdbc = %{version}-%{release} | |
138 | ||
139 | %description jdbc-devel | |
140 | Oracle Database Instant Client Package - JDBC development files. | |
141 | ||
142 | %package odbc | |
143 | Summary: ODBC for Oracle Database Instant Client | |
144 | Group: Libraries | |
145 | Requires(post,preun): /usr/bin/odbcinst | |
146 | Requires: %{name} = %{version}-%{release} | |
147 | Requires: unixODBC | |
148 | ||
149 | %description odbc | |
150 | Oracle Database Instant Client Package - ODBC. | |
151 | Additional libraries for enabling ODBC applications. | |
152 | ||
153 | %package sqlplus | |
154 | Summary: Oracle Database Client - SQL*Plus | |
155 | Group: Applications/Databases | |
156 | Requires: %{name} = %{version}-%{release} | |
157 | ||
158 | %description sqlplus | |
159 | Oracle Database Instant Client Package - SQL*Plus. | |
160 | Additional libraries and executable for running SQL*Plus | |
161 | with Instant Client. | |
162 | ||
163 | %package tools | |
164 | Summary: Oracle Database Workload Replay Client | |
165 | Group: Applications/Databases | |
166 | Requires: %{name} = %{version}-%{release} | |
167 | ||
168 | %description tools | |
169 | Oracle Database Instant Client Package - WRC. | |
170 | Workload Replay Client used to replay workload | |
171 | for RAT's DB Replay Feature. | |
172 | ||
b06df208 JR |
173 | %package precomp |
174 | Summary: Oracle Database Client - Precompiler | |
175 | Group: Applications/Databases | |
176 | Requires: %{name} = %{version}-%{release} | |
177 | ||
178 | %description precomp | |
179 | Oracle Database Instant Client Package - Precompiler. | |
180 | Additional files for "proc" binary and related files | |
181 | to precompile a Pro*C application and demo. | |
182 | ||
8ef2b0d1 JR |
183 | %prep |
184 | %ifarch %{ix86} | |
091300ab | 185 | %setup -qcT -b %{?with_lite:1}%{!?with_lite:0} -b 2 -b 3 -b 4 -b 5 -b 6 -b 7 |
89420c84 | 186 | %patch0 -p1 |
8ef2b0d1 | 187 | %endif |
8ef2b0d1 | 188 | %ifarch %{x8664} |
091300ab | 189 | %setup -qcT -b %{?with_lite:11}%{!?with_lite:10} -b 12 -b 13 -b 14 -b 15 -b 16 -b 17 |
89420c84 | 190 | %patch1 -p1 |
8ef2b0d1 | 191 | %endif |
091300ab | 192 | mv instantclient_*/* . |
8ef2b0d1 JR |
193 | |
194 | %install | |
195 | rm -rf $RPM_BUILD_ROOT | |
196 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_datadir}/sqlplus/admin} \ | |
197 | $RPM_BUILD_ROOT{%{_examplesdir}/%{name},%{_includedir}/oracle/client} \ | |
b06df208 | 198 | $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_javadir},/etc} |
8ef2b0d1 | 199 | |
091300ab ER |
200 | cp -p *.jar $RPM_BUILD_ROOT%{_javadir} |
201 | cp -a *.so* $RPM_BUILD_ROOT%{_libdir} | |
8ef2b0d1 JR |
202 | install -p sqlplus $RPM_BUILD_ROOT%{_bindir} |
203 | install -p genezi $RPM_BUILD_ROOT%{_bindir} | |
204 | install -p adrci $RPM_BUILD_ROOT%{_bindir} | |
205 | install -p wrc $RPM_BUILD_ROOT%{_bindir} | |
b06df208 | 206 | install -p uidrvci $RPM_BUILD_ROOT%{_bindir} |
091300ab | 207 | cp -p glogin.sql $RPM_BUILD_ROOT%{_datadir}/sqlplus/admin |
8ef2b0d1 JR |
208 | |
209 | %{__sed} -e 's|@@prefix@@|%{_prefix}|' \ | |
210 | -e 's|@@libdir@@|%{_libdir}|' \ | |
211 | -e 's|@@includedir@@|%{_includedir}/oracle/client|' \ | |
212 | -e 's|@@version@@|%{version}|' %{SOURCE20} > \ | |
213 | $RPM_BUILD_ROOT%{_bindir}/oracle-instantclient-config | |
214 | ||
215 | %{__sed} -e 's|@@prefix@@|%{_prefix}|' \ | |
216 | -e 's|@@libdir@@|%{_libdir}|' \ | |
217 | -e 's|@@includedir@@|%{_includedir}/oracle/client|' \ | |
218 | -e 's|@@version@@|%{version}|' %{SOURCE21} > \ | |
219 | $RPM_BUILD_ROOT%{_pkgconfigdir}/oracle-instantclient.pc | |
220 | ||
091300ab | 221 | cp -p sdk/ottclasses.zip $RPM_BUILD_ROOT%{_javadir} |
8ef2b0d1 | 222 | install -p sdk/ott $RPM_BUILD_ROOT%{_bindir} |
b06df208 JR |
223 | install -p sdk/proc* $RPM_BUILD_ROOT%{_bindir} |
224 | install -p sdk/rtsora* $RPM_BUILD_ROOT%{_bindir} | |
091300ab ER |
225 | cp -a sdk/include/* $RPM_BUILD_ROOT%{_includedir}/oracle/client |
226 | cp -a sdk/demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name} | |
8ef2b0d1 | 227 | |
091300ab | 228 | cp -p cobsqlintf.o $RPM_BUILD_ROOT%{_libdir} |
b06df208 JR |
229 | cp -a precomp $RPM_BUILD_ROOT%{_libdir} |
230 | ||
091300ab | 231 | %{__sed} -i -e "s|@GCC_SYS_INC_DIR@|%{_gcc_sys_inc_dir}|g" \ |
b06df208 JR |
232 | $RPM_BUILD_ROOT%{_libdir}/precomp/admin/pcscfg.cfg |
233 | ||
bddda889 | 234 | cat <<EOF >$RPM_BUILD_ROOT/etc/tnsnames.ora |
f07de597 JR |
235 | ORCL = |
236 | (DESCRIPTION = | |
237 | (ADDRESS_LIST = | |
238 | (ADDRESS = | |
239 | (PROTOCOL = TCP) | |
240 | (Host = localhost) | |
241 | (Port = 1521) | |
242 | ) | |
243 | ) | |
244 | (CONNECT_DATA = (SID = ORCL) | |
245 | ) | |
246 | ) | |
247 | EOF | |
248 | ||
ac50007d JR |
249 | # rename to avoid clash with openldap header or php build will suffer |
250 | mv $RPM_BUILD_ROOT%{_includedir}/oracle/client/{ldap.h,oraldap.h} | |
251 | ||
8ef2b0d1 JR |
252 | cd $RPM_BUILD_ROOT%{_libdir} |
253 | for ff in lib*.so.* ; do | |
254 | ln -s $ff ${ff:%%.so.*}.so | |
255 | done | |
256 | ||
257 | %clean | |
258 | rm -rf $RPM_BUILD_ROOT | |
259 | ||
091300ab ER |
260 | %post basic -p /sbin/ldconfig |
261 | %postun basic -p /sbin/ldconfig | |
8ef2b0d1 | 262 | |
091300ab ER |
263 | %post basiclite -p /sbin/ldconfig |
264 | %postun basiclite -p /sbin/ldconfig | |
8ef2b0d1 | 265 | |
091300ab ER |
266 | %post jdbc -p /sbin/ldconfig |
267 | %postun jdbc -p /sbin/ldconfig | |
8ef2b0d1 | 268 | |
091300ab ER |
269 | %post sqlplus -p /sbin/ldconfig |
270 | %postun sqlplus -p /sbin/ldconfig | |
8ef2b0d1 JR |
271 | |
272 | %post odbc | |
273 | /sbin/ldconfig | |
274 | # install Orcale driver | |
275 | /usr/bin/odbcinst -i -d -r <<EOF | |
091300ab ER |
276 | [%{driver_name}] |
277 | Description = %{driver_desc} | |
278 | Driver = %{_libdir}/libsqora.so.%{soname} | |
8ef2b0d1 JR |
279 | Setup = |
280 | EOF | |
281 | ||
282 | %preun odbc | |
091300ab | 283 | /usr/bin/odbcinst -u -d -n %{driver_name} || : |
8ef2b0d1 JR |
284 | |
285 | %postun odbc -p /sbin/ldconfig | |
286 | ||
287 | %if %{with lite} | |
288 | %files basiclite | |
289 | %defattr(644,root,root,755) | |
091300ab | 290 | %doc BASIC_LITE_README |
8ef2b0d1 | 291 | %attr(755,root,root) %{_libdir}/libociicus.so |
8ef2b0d1 JR |
292 | %else |
293 | %files basic | |
294 | %defattr(644,root,root,755) | |
091300ab ER |
295 | %doc BASIC_README |
296 | %attr(755,root,root) %{_libdir}/libociei.so | |
297 | %endif | |
298 | ||
299 | # common to basic/basiclite | |
f07de597 | 300 | %config(noreplace) %verify(not md5 mtime size) /etc/tnsnames.ora |
8ef2b0d1 JR |
301 | %attr(755,root,root) %{_bindir}/adrci |
302 | %attr(755,root,root) %{_bindir}/genezi | |
b06df208 | 303 | %attr(755,root,root) %{_bindir}/uidrvci |
8ef2b0d1 | 304 | %attr(755,root,root) %{_libdir}/libocci.so.* |
091300ab ER |
305 | %attr(755,root,root) %{_libdir}/libocijdbc%{driver_ver}.so |
306 | %attr(755,root,root) %{_libdir}/libnnz%{driver_ver}.so | |
307 | %attr(755,root,root) %{_libdir}/libclntsh.so.* | |
308 | %attr(755,root,root) %{_libdir}/libclntshcore.so.%{soname} | |
309 | %attr(755,root,root) %{_libdir}/libons.so | |
310 | %attr(755,root,root) %{_libdir}/liboramysql12.so | |
8ef2b0d1 JR |
311 | |
312 | %files devel | |
313 | %defattr(644,root,root,755) | |
091300ab | 314 | %doc sdk/SDK_README |
8ef2b0d1 JR |
315 | %attr(755,root,root) %{_bindir}/oracle-instantclient-config |
316 | %attr(755,root,root) %{_bindir}/ott | |
317 | %attr(755,root,root) %{_libdir}/libclntsh.so | |
318 | %attr(755,root,root) %{_libdir}/libocci.so | |
091300ab | 319 | %attr(755,root,root) %{_libdir}/libclntshcore.so |
8ef2b0d1 | 320 | %{_pkgconfigdir}/oracle-instantclient.pc |
091300ab | 321 | %dir %{_includedir}/oracle |
8ef2b0d1 | 322 | %{_includedir}/oracle/client |
b06df208 JR |
323 | %exclude %{_includedir}/oracle/client/oraca.h |
324 | %exclude %{_includedir}/oracle/client/sql2oci.h | |
325 | %exclude %{_includedir}/oracle/client/sqlapr.h | |
326 | %exclude %{_includedir}/oracle/client/sqlca.h | |
327 | %exclude %{_includedir}/oracle/client/sqlcpr.h | |
328 | %exclude %{_includedir}/oracle/client/sqlda.h | |
329 | %exclude %{_includedir}/oracle/client/sqlkpr.h | |
330 | %exclude %{_includedir}/oracle/client/sqlucs2.h | |
8ef2b0d1 | 331 | %{_examplesdir}/%{name} |
b06df208 JR |
332 | %exclude %{_examplesdir}/%{name}/demo_proc*_ic.mk |
333 | %exclude %{_examplesdir}/%{name}/*.pc* | |
8ef2b0d1 JR |
334 | |
335 | %files jdbc | |
336 | %defattr(644,root,root,755) | |
091300ab ER |
337 | %doc JDBC_README |
338 | %attr(755,root,root) %{_libdir}/libheteroxa%{driver_ver}.so | |
8ef2b0d1 JR |
339 | %{_javadir}/*.jar |
340 | ||
341 | %files jdbc-devel | |
342 | %defattr(644,root,root,755) | |
8ef2b0d1 JR |
343 | %{_javadir}/*.zip |
344 | ||
345 | %files odbc | |
346 | %defattr(644,root,root,755) | |
091300ab | 347 | %doc ODBC*.htm* |
8ef2b0d1 JR |
348 | %attr(755,root,root) %{_libdir}/libsqora.so* |
349 | ||
350 | %files sqlplus | |
351 | %defattr(644,root,root,755) | |
091300ab | 352 | %doc SQLPLUS_README |
8ef2b0d1 JR |
353 | %attr(755,root,root) %{_bindir}/sqlplus |
354 | %attr(755,root,root) %{_libdir}/libsqlplus.so | |
355 | %attr(755,root,root) %{_libdir}/libsqlplusic.so | |
356 | %{_datadir}/sqlplus | |
357 | ||
358 | %files tools | |
359 | %defattr(644,root,root,755) | |
091300ab | 360 | %doc TOOLS_README |
8ef2b0d1 | 361 | %attr(755,root,root) %{_bindir}/wrc |
b06df208 JR |
362 | |
363 | %files precomp | |
364 | %defattr(644,root,root,755) | |
091300ab | 365 | %doc PRECOMP_README |
b06df208 JR |
366 | %attr(755,root,root) %{_bindir}/proc* |
367 | %attr(755,root,root) %{_bindir}/rtsora | |
368 | %{_libdir}/cobsqlintf.o | |
369 | %{_libdir}/precomp | |
370 | %{_examplesdir}/%{name}/demo_proc*_ic.mk | |
371 | %{_examplesdir}/%{name}/*.pc* | |
091300ab ER |
372 | |
373 | # precomp-devel maybe | |
374 | %{_includedir}/oracle/client/oraca.h | |
375 | %{_includedir}/oracle/client/sql2oci.h | |
376 | %{_includedir}/oracle/client/sqlapr.h | |
377 | %{_includedir}/oracle/client/sqlca.h | |
378 | %{_includedir}/oracle/client/sqlcpr.h | |
379 | %{_includedir}/oracle/client/sqlda.h | |
380 | %{_includedir}/oracle/client/sqlkpr.h | |
381 | %{_includedir}/oracle/client/sqlucs2.h |