| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- ##
- ## oracle-barebone.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
- ##
- ## 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: The OpenPKG Project
- Distribution: OpenPKG
- Class: PRIV
- Group: Database
- License: Commercial
- Version: %{V_major}
- Release: 20040818
- # 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
- prog oracle-barebone = {
- disabled
- comment = "rse: commercial package, no download URL"
- version = 0
- url = ftp://ftp.openpkg.org/
- regex = .*
- }
- %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
|