# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=perl-protocol-websocket
_pkgreal=Protocol-WebSocket
pkgver=0.20
pkgrel=0
pkgdesc="WebSocket protocol"
url="http://search.cpan.org/dist/Protocol-WebSocket/"
arch="noarch"
license="GPL PerlArtistic"
depends="perl"
makedepends="perl-dev perl-module-build-tiny"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/V/VT/VTI/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	perl Build.PL --installdirs=vendor
}

build() {
	cd "$builddir"
	./Build
}

check() {
	cd "$builddir"
	./Build test
}

package() {
	cd "$builddir"
	./Build install --destdir="$pkgdir"
}

sha512sums="ee76314fabb4126858c7211aa5e2b679885f37d34cf934f2ac2a5482e89973c3b06051c6ad7f8460c9222816e3d5dc93183225ba7f0ccfae084abeec791a5bcb  Protocol-WebSocket-0.20.tar.gz"
