# Contributor: Emmanuel Frecon <efrecon@gmail.com>
# Maintainer:
pkgname=tcl-tls
pkgver=1.7.10
pkgrel=2
pkgdesc="OpenSSL extension to Tcl"
url="https://core.tcl.tk/tcltls/"
arch="all"
license="BSD"
depends=""
depends_dev="tcl-dev libressl-dev"
makedepends="$depends_dev"
install=""
subpackages=""
source="https://core.tcl.tk/tcltls/uv/tcltls-$pkgver.tar.gz"

_builddir="$srcdir/tcltls-${pkgver}"

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"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-shared \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

md5sums="9224bca960827a95809cd4c0238af8a7  tcltls-1.7.10.tar.gz"
sha256sums="124fe08f782b95ac688c983c65e2e66c6cc1235bfa36fd55ff6db4ef45c6b1f3  tcltls-1.7.10.tar.gz"
sha512sums="90ed8dab651dd1dc455086d86b913ce4200a7eb6425bc3c021331b45f3279c226733b74d8cf27946bc58332881046053d9a95538d46fcac8215c2faefa5e86e3  tcltls-1.7.10.tar.gz"
