updated on Thu Jan 26 12:02:26 UTC 2012
[aur-mirror.git] / oracle / PKGBUILD
blob36b220e953764ba03c49a3ef4f9a4fe1c2341338
1 # Contributor: Ali H. Caliskan <ali.h.caliskan//gmail.com>
3 _filename=linux_11gR1_database_1013.zip
4 pkgname=oracle
5 pkgver=11gR1
6 pkgrel=1
7 pkgdesc="Database Management System"
8 url="http://www.oracle.com"
9 arch=('i686' 'x86_64')
10 license=('OTN')
11 install=${pkgname}.install
12 depends=('java-runtime' 'ksh' 'rpm' 'gawk' 'gdb' 'libaio' 'libelf' \
13          'sysstat' 'libstdc++5')
14 [ "$CARCH" = "i686" ] && depends=(${depends[@]} 'unixodbc')
15 conflicts=('oracle-xe')
16 [ "$CARCH" = "x86_64" ] && _filename=linux.x64_11gR1_database_1013.zip
17 source=("$_filename" 'oracledb' 'ee.rsp.patch')
18 md5sums=('a54e9380a40cecfc5bf6da99c857c39b'
19          '312a4d0253e253df1e9bd54b13e6c3cd'
20          '41d814ec8ff90931561ed3c13ffae29b')
21 [ "$CARCH" = "x86_64" ] && md5sums[0]='b575b12fe5aa1595f6ddfb256de5d362'
23 build() {
24         cd $srcdir
26         # Creating ORACLE_HOME dir
27         mkdir -p $pkgdir/home/oracle/app/oracle/product/11.1.0/orarch
29         # Copy Oracle database files
30         mkdir -p $pkgdir/home/oracle/tmp
31         mv database $pkgdir/home/oracle/tmp/
33   if [ "$CARCH" = "x86_64" ]; then
35         # Preparing for the native unzip 
36         mv $pkgdir/home/oracle/tmp/database/install/unzip \
37         $pkgdir/home/oracle/tmp/database/install/unzip.bak
39         # Creating x64_64 specific symbolic links
40         mkdir -p $pkgdir/usr
41         /bin/ln -s /usr/lib $pkgdir/usr/lib64
42         /bin/ln -s /usr/bin/unzip \
43         $pkgdir/home/oracle/tmp/database/install/unzip
45   fi
47         # Patching the Oracle database
48         export PATCH=`pwd`
49         cd $pkgdir/home/oracle/tmp
50         patch -Np1 -i $PATCH/ee.rsp.patch
52         # Creating symbolic links 
53         mkdir -p $pkgdir/bin
54         mkdir -p $pkgdir/usr/bin
55         /bin/ln -s /usr/bin/ksh $pkgdir/bin/ksh 
56         /bin/ln -s /bin/awk $pkgdir/usr/bin/awk
57         /bin/ln -s /bin/tr $pkgdir/usr/bin/tr
58         /bin/ln -s /usr/bin/basename $pkgdir/bin/basename
60         # Install oracledb
61         install -Dm755 $srcdir/oracledb $pkgdir/etc/rc.d/oracledb