summaryrefslogtreecommitdiff
path: root/community/myodbc/PKGBUILD
blob: a9709614ce16c9c7d722824bc10e3f5f43551a21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# $Id: PKGBUILD 100622 2013-11-06 14:11:22Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=myodbc
pkgver=5.2.6
pkgrel=1
pkgdesc="ODBC driver/connector for mariadb"
arch=(i686 x86_64)
url="http://dev.mysql.com/downloads/connector/odbc/"
depends=('unixodbc' 'libmariadbclient')
makedepends=('cmake')
license=('GPL')
options=('libtool')
source=("http://cdn.mysql.com/Downloads/Connector-ODBC/5.2/mysql-connector-odbc-$pkgver-src.tar.gz")
md5sums=('066bfed7dc472ef4b68bafc95ca45027')

build() {
  cd $srcdir/mysql-connector-odbc-${pkgver}-src
  unset CFLAGS
  export LDFLAGS="-lpthread -ldl"
  cmake -G "Unix Makefiles" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DMYSQLCLIENT_LIB_NAME=libmysqlclient_r.so \
    -DWITH_UNIXODBC=1 .
  make
}

package() {
  cd $srcdir/mysql-connector-odbc-${pkgver}-src
  make DESTDIR=$pkgdir install
  pushd $pkgdir/usr
  rm -rf test
  install -dm0755 share/mysql-connector-odbc
  mv ChangeLog COPYING INSTALL Licenses_for_Third-Party_Components.txt README README.debug \
	share/mysql-connector-odbc/
  popd
}