# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=gwsocket
pkgver=0.2
pkgrel=1
pkgdesc="A simple, standalone, language-agnostic, RFC6455 compliant WebSocket Server"
url="http://gwsocket.io"
arch="all"
license="MIT"
makedepends="autoconf automake"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/allinurl/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	autoreconf -fiv
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	./gwsocket --version > /dev/null
}

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

sha512sums="074676e8df80b3250be041e0f9225e6a5ba59eb8ecad9b95cd2b11038e52bc0a462144fbc302eb9b7816f38a23b12b4d9a7e949dce206fcb19938adeb5f4feb2  gwsocket-0.2.tar.gz"
