summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 49c5b999071a5cb63434723c06168c144d188edc (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.5.0.r6.gbc738c8
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 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

	cargo build --release --locked --features=ssl
}

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

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