aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/mysql-connector-odbc/APKBUILD
blob: 4a95b3e167241aa18cabc3053459bce8c5783ff2 (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
38
39
40
41
42
43
44
45
46
47
48
49
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mysql-connector-odbc
pkgver=5.2.7
pkgrel=0
pkgdesc="ODBC driver for MySQL"
url="http://dev.mysql.com/downloads/connector/odbc/"
arch="all"
license="GPLv2 with exceptions"
depends=""
depends_dev=""
makedepends="$depends_dev mysql-dev unixodbc-dev cmake"
install=""
subpackages=""
source="http://dev.mysql.com/get/Downloads/Connector-ODBC/${pkgver%.*}/mysql-connector-odbc-$pkgver-src.tar.gz"

_builddir="$srcdir"/mysql-connector-odbc-$pkgver-src
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	cmake . -G "Unix Makefiles" \
		-DWITH_UNIXODBC=1 \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DMYSQLCLIENT_LIB_NAME=mysqlclient \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -r "$pkgdir"/usr/[A-Z]* \
		"$pkgdir"/usr/bin \
		"$pkgdir"/usr/test \
		|| return 1

}

md5sums="4e1e313fd4e2fe46741802b026c4c5fe  mysql-connector-odbc-5.2.7-src.tar.gz"
sha256sums="0ad8fcccb4c41c7100fe02ec0aa87938d33329d23f7b68d1b9031c87750392c9  mysql-connector-odbc-5.2.7-src.tar.gz"
sha512sums="f54ac8a23ade71da85e1335e95eccdccfd68a8687d17a584ced103812bdc5aee8014769a84eaa22724bb2cb23d34c7188c964d3283723defeaef5157a4b3c60f  mysql-connector-odbc-5.2.7-src.tar.gz"