updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / instantclient-odbc / PKGBUILD
blob5650064f1527789499c44d2b33b70e00c0ee2fac
1 # Contributor: Vitaliy Berdinskikh <skipper13@archlinux.org.ua>
2 # Maintainer: xduugu
3 pkgname=instantclient-odbc
4 pkgver=11.2.0.1
5 pkgrel=3
6 pkgdesc="Additional libraries for enabling ODBC applications with Instant Client"
7 arch=('i686' 'x86_64')
8 url="http://www.oracle.com/technology/tech/oci/instantclient/"
9 license=('custom:OTN')
10 depends=("instantclient-basic=$pkgver")
12 # grab the source from
13 # i686  : http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
14 # x86_64: http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxx86_64soft.html
16 source=($pkgname-linux32-$pkgver.zip LICENSE)
17 md5sums=('55a09a9ba803dbc3f9d053a9cba8af2d'
18          '2d62e22e4f2d7e6d220fafde0f692a7d')
19 sha256sums=('d33b1c4fa39e14b862ce9f45fbf96320544e86b00d2066dfa97d41cd86c1342a'
20             'f904a30b07ddf7806a33620f93b94c3d315154d26a371ece48695bb3555064a2')
22 if [[ $CARCH = x86_64 ]]; then
23         source[0]=oracle-${pkgname%%-*}$(echo $pkgver | sed -r 's/^([0-9]+\.[0-9]+).*$/\1/')-${pkgname#*-}-${pkgver}.0-1.$CARCH.zip
24         md5sums=('5bb55794190d4131133c92adfba57f8a'
25            '2d62e22e4f2d7e6d220fafde0f692a7d')
26         sha256sums=('9f3fca68466592c2c33c45c1aad5191dc40499c356d25c20d15163fd9ac1af91'
27               'f904a30b07ddf7806a33620f93b94c3d315154d26a371ece48695bb3555064a2')
30 build() {
31         local dest=$pkgdir/opt/${pkgname%%-*}
33         # copy files
34         local pkgver=${pkgver/./_}
35         install -d "${dest%/*}" "$pkgdir/usr/bin" &&
36         cp -a "$srcdir/${pkgname%%-*}_${pkgver%%.*}" "$dest" &&
37         ln -s "/opt/${pkgname%%-*}/odbc_update_ini.sh" \
38                 "$pkgdir/usr/bin/odbc_update_ini" || return 1
40         # fix permissions
41         cd "$dest" &&
42         chmod a=rx,u+w * &&
43         chmod a-x *.htm{,l} || return 1
45         install -Dm644 "$srcdir/LICENSE" \
46                 "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
49 # vim:set ts=2 sw=2 noet: