# Contributor: Vitaliy Berdinskikh <skipper13@archlinux.org.ua>
# Contributor: Andrea Agosti <cifvts@gmail.com>
# Contributor: Charles Clement <caratorn@gmail.com>
# Maintainer: xduugu
pkgname=instantclient-sdk
pkgver=11.2.0.2.0
pkgrel=1
pkgdesc="Additional header files for developing Oracle applications with Instant Client"
arch=('i686' 'x86_64')
url="http://www.oracle.com/technology/tech/oci/instantclient/"
license=('custom:OTN')
depends=(instantclient-basic)
#
# grab the source from
# i686 : http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
# x86_64: http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxx86_64soft.html
#
source=($pkgname-linux32-$pkgver.zip LICENSE)
md5sums=('a0034b6f3ea18480d9857de7777a515e'
'2d62e22e4f2d7e6d220fafde0f692a7d')
sha256sums=('172c0116de16f55abd775aaf4dd1666d0e64eb1226b43388974ccf83235c8b18'
'f904a30b07ddf7806a33620f93b94c3d315154d26a371ece48695bb3555064a2')
if [[ $CARCH = x86_64 ]]; then
source[0]=oracle-${pkgname%%-*}$(echo $pkgver | sed -r 's/^([0-9]+\.[0-9]+).*$/\1/')-${pkgname#*-}-${pkgver}.0-1.$CARCH.zip
md5sums=('201ed479c9cfd3905cecbd213c656331'
'2d62e22e4f2d7e6d220fafde0f692a7d')
sha256sums=('9faf4edec8806e8ed38419d17587e19de673a9e0bbdeb24a9e232e118681500e'
'f904a30b07ddf7806a33620f93b94c3d315154d26a371ece48695bb3555064a2')
fi
build() {
local dest=$pkgdir/opt/${pkgname%%-*}
# copy files
local pkgver=${pkgver/./_}
install -d "${dest%/*}" &&
cp -a "$srcdir/${pkgname%%-*}_${pkgver%%.*}" "$dest" || return 1
# fix permissions
cd "$dest/sdk" &&
chmod -R a=r,u+w,a+X * || return 1
install -Dm644 "$srcdir/LICENSE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
}
# vim:set ts=2 sw=2 noet: