archrelease: copy trunk to community-any
[ArchLinux/community.git] / libwslay / trunk / PKGBUILD
blob151b8dda2563f1c83fc60e5714edbd6da214f4c7
1 # Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2 # Contributor: Cebtenzzre <cebtenzzre (at) gmail (dot) com>
3 # Contributor: Andy Weidenbaum <archbaum@gmail.com>
5 pkgname=libwslay
6 pkgver=1.1.1
7 pkgrel=5
8 pkgdesc='WebSocket library'
9 arch=(x86_64)
10 provides=(wslay)
11 replaces=(wslay)
12 makedepends=(python-sphinx)
13 checkdepends=(cunit)
14 optdepends=('nettle: needed for wslay_testclient')
15 url='https://github.com/tatsuhiro-t/wslay'
16 license=(MIT)
17 source=("$pkgname-$pkgver.tar.bz2::https://github.com/tatsuhiro-t/wslay/releases/download/release-$pkgver/wslay-$pkgver.tar.bz2"
18         sphinx-4.patch)
19 b2sums=('e5b5e7435e1e3a82cef4407f2a5fbcf4168f2814546074d8ee5aa70f36acabc648bc58f14aaee53bc6be7ab7e18c39a4f8e16fba507dc85f19ee4f79a827be6e'
20         '12dc00c3dfcf29a0263b93638164ab9e99a9672962714392cf8f28421498d138a83779a267f59892b579f66dfc4b7fca8c8b1a3662040d9dc29d1841ebe42ea9')
22 prepare() {
23   cd wslay-$pkgver
24   patch -Np1 -i ../sphinx-4.patch
27 build() {
28   cd wslay-$pkgver
29   autoreconf -i
30   ./configure \
31     --libexecdir=/usr/lib/wslay \
32     --localstatedir=/var/lib/wslay \
33     --prefix=/usr \
34     --sbindir=/usr/bin \
35     --sharedstatedir=/usr/share/wslay \
36     --sysconfdir=/etc \
37     --with-gnu-ld
38   make
41 check() {
42   make -C wslay-$pkgver
45 package() {
46   cd wslay-$pkgver
47   make DESTDIR="$pkgdir" install
48   install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
49   # rename example executables
50   cd "$pkgdir/usr/bin" && find * -type f -exec mv -v {} wslay_{} \;