summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ec6bde2f0075d094de2bf60653f132cce4ae0a64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Maintainer: Tony Lambiris <tony@libpcap.net>

pkgname=websocat-git
pkgver=1.11.0.r17.g6e0d42e
pkgrel=1
pkgdesc="Command-line client for WebSockets"
arch=(x86_64)
url="https://github.com/vi/websocat"
license=(MIT)
makedepends=(git rust)
source=("${pkgname}::git+${url}")
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${pkgname}"

	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
}

build() {
	cd "${srcdir}/${pkgname}"

	cargo build --release --features=ssl
}

package() {
	cd "${srcdir}/${pkgname}"

	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -Dm755 "target/release/websocat" "${pkgdir}/usr/bin/websocat"
}