You are not logged in.

#1 2005-12-16 10:55:37

Vins
Member
From: Italy
Registered: 2005-12-14
Posts: 67

Oracle Instant Client 10.2: PKGBUILD

Hi,

I don't know if is the correct section but....

I've just created a PKGBUILD for installing Oracle Instant Client 10.2. It works great with tora 1.3.18-2 (You have to modify the PKGBUILD and recompile it!).

This is my second package and before uploading it to AUR, I'd like to have some comments/suggestions.

Here are my files:

PKGBUILD

pkgname=oracle-instantclient
pkgver=10.2.0.1
pkgrel=1
pkgdesc="Oracle Instant Client 10.2.0.1 - Basic, SDK, SqlPlus"
url="http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html"
license=""
depends=()
makedepends=()
conflicts=()
replaces=()
backup=()
install=oracle-ic.install
source=(http://download.oracle.com/otn/linux/instantclient/instantclient-basic-linux32-10.2.0.1-20050713.zip 
    http://download.oracle.com/otn/linux/instantclient/instantclient-sdk-linux32-10.2.0.1-20050713.zip 
    http://download.oracle.com/otn/linux/instantclient/instantclient-sqlplus-linux32-10.2.0.1-20050713.zip)
md5sums=('8900afe3666a6443a16bf7b04cd1c4e0' '9f4196cb13dda122c45a8871e409ae75'
         'e24612ea9b33ef7d3eaf0dc55fb2a3d0')
build() {
  mkdir $startdir/pkg/opt
  cp -r $startdir/src/instantclient_10_2 $startdir/pkg/opt/
}

oracle-ic.install

# arg 1:  the new package version
post_install() {
        if [ ! "`grep /opt/instantclient_10_2 etc/ld.so.conf`" ]; then
                echo -n "updating /etc/ld.so.conf... "
                echo "/opt/instantclient_10_2" >>etc/ld.so.conf
                sbin/ldconfig -r .
                echo "done."
        fi
    echo -n "Creating library link for TOra compatibility ..."
    ln -s /opt/instantclient_10_2/libclntsh.so.10.1 /opt/instantclient_10_2/libclntsh.so
        echo "done."
    echo -n "Creating sqlplus link for TOra compatibility ..."
    mkdir /opt/instantclient_10_2/bin
    ln -s /opt/instantclient_10_2/sqlplus /opt/instantclient_10_2/bin/sqlplus
    echo "done."
    echo ""
        echo "NOTE: Please set your ORACLE_HOME to /opt/instantclient_10_2."
        echo "Provide a tnsnames.ora and set TNS_ADMIN variable to dir where tnsnames.ora is."
        echo "If you want to use sqlplus, please rembember to add /opt/instantclient_10_2 to your PATH variable."
        echo ""
        echo ""
        echo "NOTE: If you want to compile TOra using oracle instant client,"
        echo "please make sure to run the ./configure script with the"
        echo "following syntax:"
        echo ""
        echo "./configure --prefix=/usr --with-x --with-qt-dir=/opt/qt --with-oracle=/opt/instantclient_10_2 --with-oracle-includes=/opt/instantclient_10_2/sdk/include --with-oracle-libraries=/opt/instantclient_10_2/"
    echo ""
}
# arg 1:  the old package version
pre_remove() {
        echo -ne "nupdating /etc/ld.so.conf... "
        sed -i -e '//opt/instantclient_10_2/d' etc/ld.so.conf
        sbin/ldconfig -r .
        echo "done."
    echo -ne "Removing library link for TOra compatibility..."
    rm -rf /opt/instantclient_10_2/libclntsh.so
    echo "done."
    echo -ne "Removing sqlplus link for TOra compatibility..."
    rm -rf /opt/instantclient_10_2/bin
    echo "done."
    echo ""
    echo ""
}
op=$1
shift
$op $*

Thanks :-)


Vins

Offline

#2 2005-12-16 11:43:38

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: Oracle Instant Client 10.2: PKGBUILD

Vins wrote:

Hi,

I don't know if is the correct section but....

For some reason, these sorts of annoucements typically feature in "AUR Package Requests", even though they aren't requests.

Otherwise, nice one and keep up the good work smile

Offline

#3 2006-11-23 09:10:22

noise_
Member
Registered: 2006-01-31
Posts: 12

Re: Oracle Instant Client 10.2: PKGBUILD

hm, doesn't work. can't download the packages...
note: to download something from oracle you have to be registered (I am but it doesn't work neither)

Offline

Board footer

Powered by FluxBB