You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
143 lines
5.6 KiB
143 lines
5.6 KiB
## |
|
## oracle-barebone.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package version |
|
%define V_major 9.2.0 |
|
%define V_minor_lnx 4 |
|
%define V_minor_sol 1 |
|
|
|
# package information |
|
Name: oracle-barebone |
|
Summary: Oracle Barebone Distribution |
|
URL: - |
|
Vendor: The OpenPKG Project |
|
Packager: OpenPKG Foundation e.V. |
|
Distribution: OpenPKG Community |
|
Class: EVAL |
|
Group: Database |
|
License: Commercial |
|
Version: %{V_major} |
|
Release: 20080101 |
|
|
|
# list of sources |
|
Source0: http://www.oracle.com/::/oracle-barebone-%{V_major}.%{V_minor_lnx}.ix86-linux.cpio.bz2 |
|
Source1: http://www.oracle.com/::/oracle-barebone-%{V_major}.%{V_minor_sol}.sun4u-sunos5.8.cpio.bz2 |
|
Source2: http://www.oracle.com/::/oracle-barebone-%{V_major}.%{V_minor_sol}.sun4u-sunos5.9.cpio.bz2 |
|
Source3: oracle-barebone.txt |
|
Source4: oracle-barebone.pl |
|
%NoSource 0 |
|
%NoSource 1 |
|
%NoSource 2 |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20040130 |
|
PreReq: OpenPKG, openpkg >= 20040130 |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
This is the Oracle Barebone distribution, containing the Oracle 9i |
|
%{V_major}.X Client C API. It is a stripped down installation file |
|
set of a standard Oracle 9i Client Run-Time installation. |
|
|
|
%track |
|
|
|
%prep |
|
%setup -T -D -c |
|
|
|
%build |
|
|
|
%install |
|
# create installation area |
|
rm -rf $RPM_BUILD_ROOT |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone |
|
|
|
# unpack barebone distribution |
|
# (rpmlint workaround: %{SOURCE3} %{SOURCE4}) |
|
( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone |
|
case "%{l_platform -t}" in |
|
i?86*-linux* ) cpio="%{SOURCE0}" ;; |
|
sun4*-sunos5.8* ) cpio="%{SOURCE1}" ;; |
|
sun4*-sunos5.9* ) cpio="%{SOURCE2}" ;; |
|
* ) echo "Platform \"%{l_platform -t}\" not supported" 1>&2; exit 1 ;; |
|
esac |
|
# unpack with vendor cpio(1) |
|
%{l_bzip2} -d -c $cpio | cpio -idmu |
|
) || exit $? |
|
|
|
# fake unix.rgs file (some users like DBD::Oracle use it |
|
# to figure out the Oracle version number |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/install |
|
echo "rdbms %{version}" \ |
|
>$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/install/unix.rgs |
|
|
|
# provide SQL*Plus environment |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/oracle-barebone |
|
if [ ! -f $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/sqlnet.ora ]; then |
|
mv $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/samples/sqlnet.ora \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/ |
|
fi |
|
if [ ! -f $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/tnsnames.ora ]; then |
|
mv $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/samples/tnsnames.ora \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/ |
|
fi |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/samples |
|
%{l_shtool} mkln -s \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network/admin/*.ora \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/oracle-barebone/ |
|
for bin in sqlplus tnsping; do |
|
( echo "#!/bin/sh" |
|
echo "ORACLE_HOME=\"%{l_prefix}/libexec/oracle-barebone\"" |
|
echo "export ORACLE_HOME" |
|
echo "LD_LIBRARY_PATH=\"%{l_prefix}/libexec/oracle-barebone/lib:/usr/lib\"" |
|
echo "export LD_LIBRARY_PATH" |
|
echo "exec %{l_prefix}/libexec/oracle-barebone/bin/$bin \${1+\"\$@\"}" |
|
) >$bin |
|
%{l_shtool} install -c -m 755 \ |
|
$bin $RPM_BUILD_ROOT%{l_prefix}/bin/$bin |
|
done |
|
|
|
# FIXME: cs: fixup permissions caused by bug in |
|
# %{SOURCE oracle-barebone.pl} (fixed in the same commit) this |
|
# chmod(1) is just a quick hack to avoid re-rolling all Oracle |
|
# stuff from vendor cpios. This hack can be removed next time |
|
# when %{SOURCE oracle-barebone.pl} is run. |
|
chmod 755 $RPM_BUILD_ROOT%{l_prefix}/libexec/oracle-barebone/network |
|
|
|
# determine installation files |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
%{l_files_std} \ |
|
'%config %{l_prefix}/libexec/oracle-barebone/network/admin/sqlnet.ora' \ |
|
'%config %{l_prefix}/libexec/oracle-barebone/network/admin/tnsnames.ora' |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|