updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / sqlplus11 / PKGBUILD
blob9b4ea148a2b913b2352e7502f64171518182426e
1 # Contributor: shahid <helllamer@gmail.com>
2 # Based on PKGBUILD from Martin Häger <martin.haeger@gmail.com>
3 pkgname=sqlplus11
4 pkgver=11.2.0.1
5 pkgrel=1
6 pkgdesc="Oracle database client"
7 arch=('i686' 'x86_64')
8 url="http://www.oracle.com/"
9 license=('custom:OTN')
10 depends=('gcc-libs' 'libaio')
11 makedepends=('chrpath')
12 source=(LICENSE)
13 install=sqlplus11.install
14 md5sums=('627a6cc294fe5e4a420652e5fac726ab')
16 case ${CARCH} in
17     x86_64) 
18         _files=('oracle-instantclient11.2-basic-'${pkgver}'.0-1.x86_64.zip'
19                 'oracle-instantclient11.2-sqlplus-'${pkgver}'.0-1.x86_64.zip')
20         _download_url="http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxx86_64soft.html"
21         ;;
22     
23     i686|*) 
24         _files=('instantclient-basic-linux32-'${pkgver}'.zip' 
25                 'instantclient-sqlplus-linux32-'${pkgver}'.zip') 
26         _download_url="http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html"
27         ;;
28 esac
30 build() {
31   msg "Download the following files from ${_download_url} and place in /tmp. Press any key to continue..."
32   for _file in ${_files[@]}
33   do
34       echo ${_file}
35   done
37   read
39   msg "Extracting..."
40   for _file in ${_files[@]}
41   do
42       unzip -o /tmp/${_file} -d ${srcdir} || return 1
43   done
44   
45   cd ${srcdir}/instantclient_11_2  
47   msg "Deleting rpaths..."
48   find . -type f -exec chrpath -d {} > /dev/null 2>&1 \; 
50   msg "Installing..."
51   mkdir -p ${pkgdir}/usr/{lib,bin,share/licenses/sqlplus}
52   find . -type f -not \( -name adrci -name sqlplus -o -name genezi -o -name "*_README" \) -exec install -m755 {} ${pkgdir}/usr/lib/ \;
53   install -m755 {sqlplus,genezi,adrci} ${pkgdir}/usr/bin/
54   install -m644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/sqlplus/ 
55   
58 # vim:set ts=2 sw=2 et: