# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=unixodbc
pkgver=2.3.4
pkgrel=2
pkgdesc="ODBC is an open specification to access Data Sources"
url="http://www.unixodbc.org/"
arch="all"
license="LGPL-2.0-or-later"
options="!check"  # No test suite.
depends=""
makedepends="readline-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-${pkgver}.tar.gz"

builddir="$srcdir/unixODBC-$pkgver"

prepare() {
	cd "$builddir"
	update_config_sub
	default_prepare
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-nls \
		--enable-gui=no
	make
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir" install
}

md5sums="bd25d261ca1808c947cb687e2034be81  unixODBC-2.3.4.tar.gz"
sha256sums="2e1509a96bb18d248bf08ead0d74804957304ff7c6f8b2e5965309c632421e39  unixODBC-2.3.4.tar.gz"
sha512sums="34799777c95539905d4bbe60ad2b83631a31a68483b6be96dba25f80fa2fff4624ba170078097c942f2206873776d179d7d02a340598c4627f8723eb6f083a26  unixODBC-2.3.4.tar.gz"
